<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Static Library Linking Problems]]></title>
		<link>http://forums.approximatrix.com/viewtopic.php?id=584</link>
		<atom:link href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=584&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Static Library Linking Problems.]]></description>
		<lastBuildDate>Fri, 16 Sep 2016 14:06:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Static Library Linking Problems]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2652#p2652</link>
			<description><![CDATA[<p>Jeff,</p><p>Thanks very much for the reply, this is very helpful.</p><p>Tony</p>]]></description>
			<author><![CDATA[null@example.com (tonypdean)]]></author>
			<pubDate>Fri, 16 Sep 2016 14:06:41 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2652#p2652</guid>
		</item>
		<item>
			<title><![CDATA[Re: Static Library Linking Problems]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2650#p2650</link>
			<description><![CDATA[<p>Tony,</p><p>Building a static library in Simply Fortran does not actually import in all the necessary Fortran runtime library routines to your static library.&nbsp; You would also need to link against </p><div class="codebox"><pre><code>C:\Program Files (x86)\Simply Fortran 2\mingw-w64\mingw\lib64\libgfortran.a</code></pre></div><p> to get all the necessary runtime library routines into your MS Visual C++ project.&nbsp; However, it isn&#039;t as simple as that.&nbsp; You&#039;ll also need the static GCC library that provides some additional runtime routines.&nbsp; It will get messy very quickly if it even works at all.</p><p>What I would instead suggest is that you build a Fortran dynamic link library and enable the <a href="http://simplyfortran.com/docs/full/options/project.html">&quot;All Static&quot; option under the Linker tab</a> in the Project Options window.&nbsp; That option will ensure a DLL is built that incorporates all necessary runtime routines.&nbsp; You can then link your MS Visual C++ project agains the DLL, and you&#039;ll only need a single DLL (the one you just built) to be distributed with your application (as well as any other dependencies that MS Visual C++ might introduce, of course).</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 14 Sep 2016 12:23:06 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2650#p2650</guid>
		</item>
		<item>
			<title><![CDATA[Static Library Linking Problems]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2649#p2649</link>
			<description><![CDATA[<p>Hi,</p><p>I have built a static fortran library which I am linking with a Microsoft Visual C++ program. The library compiles OK but when I link it with the C++ program there are a number of unresolved externals such as __gfortran_transfer_character_write and __gfortran_st_write_done. There are no problem resolving my functions in the library.</p><p>Are there other libraries that I need to link with the C++ program or is there a way to embed these in the fortran library. I have used the -static flag when building the fortran library but this makes no difference.</p><p>This also makes me wonder - Will I need to supply redistributables with my application?</p><p>Any help would be appreciated.</p><p>Tony</p>]]></description>
			<author><![CDATA[null@example.com (tonypdean)]]></author>
			<pubDate>Wed, 14 Sep 2016 07:18:58 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2649#p2649</guid>
		</item>
	</channel>
</rss>
