<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Order of library search]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=251</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=251&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Order of library search.]]></description>
		<lastBuildDate>Fri, 06 Sep 2013 18:33:36 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Order of library search]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=977#p977</link>
			<description><![CDATA[<p>That&#039;s weird. There are dependencies for sure, but the order they are supplied shouldn&#039;t make any difference.</p><p>The fact that your sorting them alphabetically before passing them to the linker shows that.</p><p>By the way, I &quot;upgraded&quot; to the 2.x licence <img src="https://forums.approximatrix.com/img/smilies/wink.png" width="15" height="15" alt="wink" /> . I am going to do a lot of work with Simply Fortran over the weekend.</p>]]></description>
			<author><![CDATA[null@example.com (davidb)]]></author>
			<pubDate>Fri, 06 Sep 2013 18:33:36 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=977#p977</guid>
		</item>
		<item>
			<title><![CDATA[Re: Order of library search]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=976#p976</link>
			<description><![CDATA[<p>John,</p><p>Welcome to the wonderful world of library dependencies!&nbsp; In your example, the flags have to be listed as:</p><div class="codebox"><pre><code>-ldis -luser32 -lgdi32 -lopengl32</code></pre></div><p> </p><p>because DISLIN relies on Windows&#039; <em>user32</em>, <em>gdi32</em>, and <em>opengl32</em> libraries.&nbsp; So the order just has to be in that order.&nbsp; </p><p>Simply Fortran does not automatically determine library dependencies because it would extremely difficult the way things are set up.&nbsp; GNU/Linux has a way to do it: each library can right a <em>pkgconfig</em> file that explains what other libraries it depends on.</p><p>When libraries are included in the project panel, they are passed to the linker in alphabetical order, but always before the library entries in the Linker Flags under Project Options.</p><p>I&#039;m not sure the manual explicitly outlines how libraries work.&nbsp; It is lacking in this respect.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 06 Sep 2013 17:49:06 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=976#p976</guid>
		</item>
		<item>
			<title><![CDATA[Order of library search]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=975#p975</link>
			<description><![CDATA[<p>I have noticed that the order in which libraries are listed seems to be critically important.</p><p>I am referring to when this is done by naming &quot;libxxxxxx.a&quot; libraries in the &#039;Linker&#039; field, under Project Options&gt;Project Flags.&nbsp; &nbsp;<br />I have not investigated whether it makes any difference what order they are entered when invoked by the alternative method, of adding the &quot;xxxxxx.a&quot; files (the &quot;lib...&quot; filename prefix being permissible but unnecessary), in the Project Options panel.</p><p>The example I am using, from which I have discovered this, is as follows.</p><p>When I enter the following in the Linker field, the BUILD fails with a long list of not-found subroutines:<br />[ -luser32 -lgdi32 -lopengl32 -liowin -ldis&nbsp; ]</p><p>When I enter the following in the Linker field, the BUILD succeeds:<br />[ -liowin -ldis -luser32 -lgdi32 -lopengl32&nbsp; ]</p><p>I have not checked whether this behaviour is covered by the SF2.1 help files.&nbsp; Someone please tell me to RTFM if necessary!<br />If it is not in the manual, then any guidance on how best to select the library entry sequence would be helpful.&nbsp; Also, Jeff, is this behaviour as intended?</p><p>Could anyone who knows also please also tell us whether it matters in which order we add library &quot;xxxxx.a&quot; files to the project outline, when using this method of having SF2.1 search them.<br />--- <br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Fri, 06 Sep 2013 17:20:50 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=975#p975</guid>
		</item>
	</channel>
</rss>
