<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>dev c++ makefile build error</title>
		<link>http://www.allegro.cc/forums/view/599408</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 01 Mar 2009 12:15:58 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Earlier i had allegro installed and working. It was installed trough devpaks. Today i tried to install allegrogl manually because devpak wasn&#39;t up to date so i had to fix those enviroment values &#39;MINGDIR = c:/devcpp&#39; &amp; &#39;PATH = c:/devcpp/bin&#39; (i suppose those are right?) I got everything installed manually no errors etc.</p><p>But now i&#39;m getting this error when trying to compile anything (no matter what code):<br />  [Linker error] undefined reference to `__cpu_features_init&#39; <br />  ld returned 1 exit status <br /> C:\devcpp\Makefile.win [Build Error]  [Project1.exe] Error 1 </p><p>I uninstalled dev c++, allegro, mingw32 everything and then installed all back and downloaded allegro devpak. And now it is still giving me the same error when trying to compile. I have no idea what is this. I have libraries linked &#39;-lalleg&#39; and i removed those enviroment values also, restarted but still the same. Does someone know how to fix this?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (thomp33)</author>
		<pubDate>Sun, 01 Mar 2009 11:14:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Can you provide a full build log, so we can see how Dev-C++ is invoking GCC? Alternatively, try comiling and linking  from the command line to see if you get the same error.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Sun, 01 Mar 2009 11:17:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I guess this is all it gives:</p><p>Compiler: Default compiler<br />Building Makefile: &quot;C:\devcpp\setti\test\Makefile.win&quot;<br />Executing  make...<br />make.exe -f &quot;C:\devcpp\setti\test\Makefile.win&quot; all<br />g++.exe Untitled1.o  -o &quot;Project1.exe&quot; -L&quot;C:/devcpp/lib&quot; -lldpng -lpng -lz -lagl -lalleg -luser32 -lgdi32 -lopengl32 -lglu32  </p><p>/mingw/lib/crt2.o(.text+0x37):crt1.c: undefined reference to `__cpu_features_init&#39;<br />collect2: ld returned 1 exit status</p><p>make.exe: *** [Project1.exe] Error 1</p><p>Execution terminated</p><p>Sorry don&#39;t know how to compile from command line.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (thomp33)</author>
		<pubDate>Sun, 01 Mar 2009 11:20:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The problem is probably that the libraries are being linked in the wrong order.  I have absolutely no idea how Dev-C++ deteremines what order to link them in however, as I gave up on it as an IDE years ago.</p><p>You can try to adjust it manually however by bringing up a command prompt, navigating to your project&#39;s directory and entering the following line:
</p><pre>g++.exe Untitled1.o -o &quot;Project1.exe&quot; -L&quot;C:/devcpp/lib&quot; -lldpng -lpng -lz -lagl -lalleg -luser32 -lgdi32 -lopengl32 -lglu32</pre><p>

You&#39;ll need to play around with the order of the libs (the parameters starting with -l) until you find the order that works.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Sun, 01 Mar 2009 11:30:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The order is right but it is not about it, i tried it only with the neccessary -lalleg and simple code but still it gives the same  error. This is very weird because i removed and reinstalled everything.. I downloaded dev c++ with mingw and gcc then allegro devpak. I removed all earlier configuration files so there should be nothing to mess this up. I also tried installing mingw manually but also reinstalled it, don&#39;t know if it did something.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (thomp33)</author>
		<pubDate>Sun, 01 Mar 2009 11:41:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Uninstall the devpak and try the prebuilt binaries from <a href="http://www.allegro.cc/files/">here</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Sun, 01 Mar 2009 11:43:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay it seems allegro is not the problem. I cannot compile anything. Something to do with makefile &amp; mingw.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (thomp33)</author>
		<pubDate>Sun, 01 Mar 2009 11:55:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The best way to proceed would be to first uninstall and remove everything. Then get the MinGW installer from <a href="http://sourceforge.net/project/showfiles.php?group_id=2435&amp;package_id=240780">here</a> and use it to download and install MinGW for you.  Choose the Current build, and make sure you have the following components selected: base tools, g++ compiler, MinGW make.</p><p>Then download the IDE (Dev-C++ if it&#39;s what you really want, but I&#39;d recommend you try Code::Blocks instead as it&#39;s a million times better) and install it <i>without</i> MinGW.</p><p>Then you can download and install your libraries (just so you know, C::B can also use Devpaks).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Sun, 01 Mar 2009 12:03:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay thanks i gotta try that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (thomp33)</author>
		<pubDate>Sun, 01 Mar 2009 12:15:58 +0000</pubDate>
	</item>
</rss>
