<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Link conflict building Allegro</title>
		<link>http://www.allegro.cc/forums/view/615274</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 10 Apr 2015 07:01:39 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve managed to track down all of Allegro&#39;s dependencies and built it on Windows, but it seems I can&#39;t link against it with the latest OpenAL (1.16), I get a symbol conflict during linking:</p><p>openal-soft-1.16-static.lib(helpers.obj) : error LNK2005: _al_fopen already defined in allegro-5.1.9-static.lib(file.obj)</p><p>Apparently OpenAL has a function named al_fopen, which conflicts with Allegro&#39;s same-named function and thus it won&#39;t link.  I can of course use 1.15, which doesn&#39;t have this issue, but it&#39;s something for anyone building Allegro themselves to keep in mind.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Pascoe)</author>
		<pubDate>Thu, 09 Apr 2015 20:32:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OpenALSoft&#39;s al_fopen doesn&#39;t look like a public function... there seems to be some sort of... miscompilation error. Either way, it probably won&#39;t happen if you use a DLL for OpenAL (or Allegro).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Thu, 09 Apr 2015 21:26:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, I&#39;m trying to keep my entire engine self-contained in a single ~2MB executable, which I have managed to do up to now.  Static linking is always a pain, but it&#39;s a necessary evil for this project. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p>That said, I was able to successfully link the library using OpenALSoft v1.15.1, which doesn&#39;t have the al_fopen function.  From what I can gather, while its not an external function, it is nonetheless extern because it&#39;s used outside of the source file it&#39;s defined in, causing the symbol conflict when attempting to link it statically with Allegro.</p><p>Out of curiosity, what would I be losing if I built Allegro without OpenAL support?  Is it a required dependency or...?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Pascoe)</author>
		<pubDate>Fri, 10 Apr 2015 01:20:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, looks like it&#39;s a normal, unfortunate behavior. Under Linux, you can rename the symbol using <span class="source-code">objcopy <span class="k3">-</span><span class="k3">-</span>redefine-sym <a href="http://www.allegro.cc/manual/al_fopen"><span class="a">al_fopen</span></a><span class="k3">=</span>openal_al_fopen openal-soft-1.16-static.a</span>. I think you can do something like that in Windows too using the <span class="source-code">lib</span> tool, but I&#39;ve never tried it.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/615274/1011996#target">Bruce Pascoe</a> said:</div><div class="quote"><p> Out of curiosity, what would I be losing if I built Allegro without OpenAL support? Is it a required dependency or...? </p></div></div><p>It&#39;s entirely optional everywhere, I believe (certainly so on Windows). Allegro doesn&#39;t use it&#39;s more advanced features, so you&#39;re losing nothing.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Fri, 10 Apr 2015 07:01:39 +0000</pubDate>
	</item>
</rss>
