<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>problems installing Allegro 5 + cygwin on Windows 7</title>
		<link>http://www.allegro.cc/forums/view/613862</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 03 Feb 2014 07:19:01 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>hi everybody,<br />I am experiencing some trouble installing Allegro on my working cygwin environment. I work with NetBeans IDE and my OS is Windows 7 32 bit. I can add that both hardware and OS are ok for Allegro since years ago I used to write Allegro games on this same machine using Allegro 4 and DevCpp/MinGW. That environment is gone when I re-installed my OS, but since then it worked perfectly.</p><p>In order to install Allegro 5 I followed the readme instructions but without result. I downloaded and unpacked the Allegro 5 zip file (allegro-5.0.10.zip) in c:\cygwin\lib\allegro and then opened the cygwin console and do:</p><p>cd /lib/allegro<br />mkdir build<br />cd build<br />cmake ..</p><p>at firs, it seems that my cygwin is missing the X11 dev library:</p><p>X11 not found.  You may need to install X11 development libraries.</p><p><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /> <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /> <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /></p><p>so I opened the cygwin setup and installed the package:</p><p>libX11-devel</p><p>and then issued again:</p><p>cmake ..</p><p>I noticed that cmake suggest to add this line at the beginning of CmakeLists.txt:</p><p>set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake &gt;= 2.8.4 is required</p><p>and so I&#39;ve done; after this, tried again:</p><p>X11 support currently requires OpenGL support.</p><p>GAAAAA!!! re-open the cygwin setup and install: libglut-devel libGL-devel (the setup as usual handles the dependencies by himself). Wow, again:</p><p>cmake ..</p><p>and:</p><p>X11 support requires Xcursor library.</p><p>always by the cygwin setup now install: libXcursor-devel and xcursorgen<br />and try to cmake again. This is the result:</p><p>X11 support requires Xcursor library.</p><p><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /> <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /> <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /></p><p>wow guys now I really don&#39;t know what to do... any help will be greatly appreciated! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sean_von_drake)</author>
		<pubDate>Sun, 02 Feb 2014 19:43:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try deleting CMakeCache.txt and/or your build directory, and run cmake again.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 02 Feb 2014 23:55:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>wow I feel a noob <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> I forgot that. Thank you very much Edgar!!!<br />Well, now I have done (still in the build directory):</p><p>rm -rf *<br />cmake ..</p><p>and I got:</p><p>-- Allowing GCC to use SSE instructions<br />CMake Error: The following variables are used in this project, but they are set to NOTFOUND.<br />Please set them or make sure they are set and tested correctly in the CMake files:<br />OPENGL_glu_LIBRARY (ADVANCED)<br />    linked by target &quot;allegro&quot; in directory /home/nick/Desktop/allegro-5.0.0</p><p>-- Configuring incomplete, errors occurred!</p><p>so I installed the package libGLU-devel and cmake again and... IT WORKS <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>cmake runs without errors. So I try to compile a test program in my IDE (NetBeans):</p><p>#include &lt;cstdlib&gt;<br />#include &lt;iostream&gt;<br />#include &lt;stdio.h&gt;<br />#include &lt;allegro5/allegro.h&gt;</p><p>using namespace std;</p><p>int main(int argc, char** argv) {</p><p>    ALLEGRO_DISPLAY *display = NULL;</p><p>    if (!al_init()) {<br />        fprintf(stderr, &quot;failed to initialize allegro!\n&quot;);<br />        return -1;<br />    }</p><p>    return 0;<br />}</p><p>but when I do the &quot;clean &amp; build&quot; action, the console output is:</p><p>&quot;/usr/bin/make&quot; -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf<br />make[1]: Entering directory &#39;/cygdrive/c/Users/Fabio/Documents/NetBeansProjects/testCpp007&#39;<br />rm -f -r build/Debug<br />rm -f dist/Debug/Cygwin_4.x-Windows/testcpp007.exe<br />make[1]: Leaving directory &#39;/cygdrive/c/Users/Fabio/Documents/NetBeansProjects/testCpp007&#39;</p><p>CLEAN SUCCESSFUL (total time: 1s)</p><p>&quot;/usr/bin/make&quot; -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf<br />make[1]: Entering directory &#39;/cygdrive/c/Users/Fabio/Documents/NetBeansProjects/testCpp007&#39;<br />&quot;/usr/bin/make&quot;  -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin_4.x-Windows/testcpp007.exe<br />make[2]: Entering directory &#39;/cygdrive/c/Users/Fabio/Documents/NetBeansProjects/testCpp007&#39;<br />mkdir -p build/Debug/Cygwin_4.x-Windows<br />rm -f &quot;build/Debug/Cygwin_4.x-Windows/main.o.d&quot;<br />g++    -c -g -I/cygdrive/C/cygwin/lib -MMD -MP -MF &quot;build/Debug/Cygwin_4.x-Windows/main.o.d&quot; -o build/Debug/Cygwin_4.x-Windows/main.o main.cpp<br />mkdir -p dist/Debug/Cygwin_4.x-Windows<br />g++     -o dist/Debug/Cygwin_4.x-Windows/testcpp007 build/Debug/Cygwin_4.x-Windows/main.o -L/cygdrive/C/cygwin/lib<br />build/Debug/Cygwin_4.x-Windows/main.o: In function `main&#39;:<br />/cygdrive/c/Users/Fabio/Documents/NetBeansProjects/testCpp007/main.cpp:22: undefined reference to `al_install_system&#39;<br />collect2: error: ld returned 1 exit status<br />nbproject/Makefile-Debug.mk:62: recipe for target &#39;dist/Debug/Cygwin_4.x-Windows/testcpp007.exe&#39; failed<br />make[2]: *** [dist/Debug/Cygwin_4.x-Windows/testcpp007.exe] Error 1<br />make[2]: Leaving directory &#39;/cygdrive/c/Users/Fabio/Documents/NetBeansProjects/testCpp007&#39;<br />nbproject/Makefile-Debug.mk:59: recipe for target &#39;.build-conf&#39; failed<br />make[1]: *** [.build-conf] Error 2<br />make[1]: Leaving directory &#39;/cygdrive/c/Users/Fabio/Documents/NetBeansProjects/testCpp007&#39;<br />nbproject/Makefile-impl.mk:39: recipe for target &#39;.build-impl&#39; failed<br />make: *** [.build-impl] Error 2</p><p>BUILD FAILED (exit value 2, total time: 5s)</p><p><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /> <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /> <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /></p><p>maybe it&#39;s a linking problem?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sean_von_drake)</author>
		<pubDate>Mon, 03 Feb 2014 00:15:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yes, you need to link with the allegro libraries that you just created with Cmake.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 03 Feb 2014 00:19:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>thank you again <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>uhm in NetBeans I can specify additional paths for the linker from:<br />project -&gt; properties -&gt; build -&gt; linker -&gt; additional library directories</p><p>and there I added &quot;C:/cygwin/lib&quot; (that contains the allegro5/ folder); I also added the same directory in this option fields:<br />project -&gt; properties -&gt; build -&gt; c compiler -&gt; include directories and headers<br />project -&gt; properties -&gt; build -&gt; c++ compiler -&gt; include directories and headers</p><p>in case, I can also specify static library (*.a) files to be linked from:<br />project -&gt; properties -&gt; build -&gt; linker -&gt; libraries</p><p>but I can&#39;t find any *.a file in the build directory (or subdirectories).</p><p>with the same method I usually include and link the mysql client library that I use for db connection, and that works perfectly.</p><p>I feel a noob again <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /> I am sure that the solution is really easy but I can&#39;t see it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sean_von_drake)</author>
		<pubDate>Mon, 03 Feb 2014 00:45:23 +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/613862/995865#target">sean_von_drake</a> said:</div><div class="quote"><p>
uhm in NetBeans I can specify additional paths for the linker from:<br />project -&gt; properties -&gt; build -&gt; linker -&gt; additional library directories</p><p>and there I added &quot;C:/cygwin/lib&quot;
</p></div></div><p>
Yes, that is correct.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
and there I added &quot;C:/cygwin/lib&quot; (that contains the allegro5/ folder); I also added the same directory in this option fields:<br />project -&gt; properties -&gt; build -&gt; c compiler -&gt; include directories and headers<br />project -&gt; properties -&gt; build -&gt; c++ compiler -&gt; include directories and headers
</p></div></div><p>
No the directory you should add to those options is the include directory where you installed allegro to. I think that was working already, because you compiled a simple test program including &lt;allegro5/allegro.h&gt;.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
in case, I can also specify static library (*.a) files to be linked from:<br />project -&gt; properties -&gt; build -&gt; linker -&gt; libraries</p><p>but I can&#39;t find any *.a file in the build directory (or subdirectories).
</p></div></div><p>
The *.a archive files should be in the c:/cygwin/lib folder, and you want to specify each allegro library that you are using in your code.</p><p>The Cmake build for allegro also comes with a -DWANT_MONOLITH=On|Off option so that you can build a single monolithic dll to link against (instead of linking to several or more libraries singly). The dlls will be found in the bin folder, and they go alongside your executable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 03 Feb 2014 02:42:47 +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/613862/995871#target">Edgar Reynaldo</a> said:</div><div class="quote"><p> The *.a archive files should be in the c:/cygwin/lib folder, and you want to specify each allegro library that you are using in your code.</p></div></div><p>so, this may be the problem... I can&#39;t find anywhere the *.a files; it is possible that the cmake command did not generate them?</p><p>should I try to run cmake again? or can I download the *.a files?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sean_von_drake)</author>
		<pubDate>Mon, 03 Feb 2014 04:20:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>cmake doesn&#39;t create the libraries by itself, you need to run make, and make install to finish the installation.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 03 Feb 2014 04:35:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>great, thank you <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />now that you say so, I understand that the presence of a Makefile in c:\cygwin\lib\allegro\build\ would have suggested this thing to me, if just I were not so noob in these days <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> I behold to your patience, Edgar <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>I issued make &amp;&amp; make install and it worked!!! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>after the command is done, I added in:<br />project -&gt; properties -&gt; build -&gt; linker -&gt; libraries</p><p>the libraries I need (in the example above, only liballegro.dll.a) and the clean &amp; build from the IDE was successful!</p><p>thanks to you, your help was really great</p><p>I hope the Allegro community will have my new game soon <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I also hope this thread will help anyone is having such problems with Allegro on cygwin for Windows 7 OS, and using NetBeans as IDE.</p><p>have a nice day and many thanks again!!!</p><p><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sean_von_drake)</author>
		<pubDate>Mon, 03 Feb 2014 07:19:01 +0000</pubDate>
	</item>
</rss>
