<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>How do I use Allegro?</title>
		<link>http://www.allegro.cc/forums/view/616482</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 16 Sep 2016 19:24:30 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi,<br />I&#39;m very new to game programming and have no idea what I&#39;m doing so far.</p><p>I simply want to get started in Allegro by testing to see if things are working. I want to make a simple program like on <a href="https://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Displays">https://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Displays</a> to test it out. I have simply copy-pasted it out and here is my problem. </p><p>I am familiar with very basic C compiling in the command line. I know how to code python, c and c# on a basic level. I am on a Mac. I usually run make ___.c and understand simple use of gcc and ./outputObject . However, already  on the first line of my program (probably the most crucial line), running gcc I get the error that <br />&#39;allegro5/allegro.h&#39; file not found</p><p>I had the file called al.c, ran gcc al.c and gave that error</p><p>I tried to do the best I could to set up Allegro but all I know is (I think) I have installed the library files in my usr/local/lib directory.</p><p>tl;dr I&#39;m stuck trying to compile my first program. What do I need to fix?</p><p>Thanks in advance for any help &lt;3
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (xix131)</author>
		<pubDate>Thu, 15 Sep 2016 14:52:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi and welcome!<br />From the message, the missing part is the header file. Installing allegro (or any C library) for a GCC compiler involves two types of files, the headers (*.h) go in an &quot;include&quot; library, and the library&#39;s linkable code (*.a, *.so) go in an &quot;lib&quot; directory.</p><p>I&#39;m not an OSX user, but you can check if you have a <i>/usr/local/include</i> directory.</p><p>If you don&#39;t quickly find your answers, you may want to remove the files that you put, then try the following method:<br /><a href="https://wiki.allegro.cc/index.php?title=Getting_Started#Mac_OS">https://wiki.allegro.cc/index.php?title=Getting_Started#Mac_OS</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Thu, 15 Sep 2016 16:06:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi again,<br />Thank you for the quick response.</p><p>I think I have sorted out a few things and have ran into a new problem. I think this one is easier to solve (perhaps).</p><p>I try compiling using :</p><p>and now I am no longer getting errors about including the allegro.h file. But, now I am getting errors in linking:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Undefined symbols for architecture x86_64:<br />  &quot;_al_clear_to_color&quot;, referenced from:<br />      __al_mangled_main in newal-cb23e2.o<br />  &quot;_al_create_display&quot;, referenced from:<br />      __al_mangled_main in newal-cb23e2.o<br />  &quot;_al_destroy_display&quot;, referenced from:<br />      __al_mangled_main in newal-cb23e2.o<br />  &quot;_al_flip_display&quot;, referenced from:<br />      __al_mangled_main in newal-cb23e2.o<br />  &quot;_al_install_system&quot;, referenced from:<br />      __al_mangled_main in newal-cb23e2.o<br />  &quot;_al_map_rgb&quot;, referenced from:<br />      __al_mangled_main in newal-cb23e2.o<br />  &quot;_al_rest&quot;, referenced from:<br />      __al_mangled_main in newal-cb23e2.o<br />  &quot;_main&quot;, referenced from:<br />     implicit entry/start for main executable<br />     (maybe you meant: __al_mangled_main)<br />ld: symbol(s) not found for architecture x86_64<br />clang: error: linker command failed with exit code 1 (use -v to see invocation)
</p></div></div><p>

What have I done and how do I fix this?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (xix131)</author>
		<pubDate>Thu, 15 Sep 2016 17:17:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think it&#39;s because you didn&#39;t link allegro_main in addition to allegro<br />See this: <a href="http://liballeg.org/a5docs/5.0.10/getting_started.html#the-main-function">http://liballeg.org/a5docs/5.0.10/getting_started.html#the-main-function</a></p><p>Order of linking is important, so be sure to write <i>-lallegro -lallegro_main</i>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Thu, 15 Sep 2016 17:34:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi, I think I am getting closer and closer. Still getting an error though,</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>ld: library not found for -lallegro<br />clang: error: linker command failed with exit code 1 (use -v to see invocation)
</p></div></div><p>

What would cause this error??? <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (xix131)</author>
		<pubDate>Fri, 16 Sep 2016 18:20:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/616482/1025014#target">xix131</a> said:</div><div class="quote"><p>(I think) I have installed the library files in my usr/local/lib directory.</p></div></div><p>
What files (names) did you copy there ? Do they have the same extensions as what was already there ?<br />I&#39;m asking because you could have picked files for mingw/windows or msvc/windows instead of the ones you need.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Fri, 16 Sep 2016 19:24:30 +0000</pubDate>
	</item>
</rss>
