<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using .lib from a .dll in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838149#M56395</link>
    <description>Hi

I have a major headache now, after 3 days of searching for an error that doesn't even exist on my computer. I have solution in Visual Studio 2005 with several projects, including one C# project (the GUI) and one Intel Fortran project set up as a Dynamic-link Library (dll). My problem is that this fortran project has some calls to a static library (myFile.lib), witch is included as a resource in the project. It compiles, and runs smoothly on my computer, but when I take out the program and try to run it on any other computer, the dll fails. I also have other dll's that doesn't call any .lib files, and they works fine.
&lt;BR /&gt;&lt;BR /&gt;
If I comment out the calls to the .lib-file, it all works fine, but needless to say, I need the calls to work. Anyone have any idea's what I might do wrong? Is there any settings I need to do in Visual Studio to make sure the .lib is "included" in the dll?
&lt;BR /&gt;&lt;BR /&gt;
Fast reply's are appreciated :)</description>
    <pubDate>Wed, 06 Jun 2007 12:07:37 GMT</pubDate>
    <dc:creator>mini_minsaas</dc:creator>
    <dc:date>2007-06-06T12:07:37Z</dc:date>
    <item>
      <title>Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838149#M56395</link>
      <description>Hi

I have a major headache now, after 3 days of searching for an error that doesn't even exist on my computer. I have solution in Visual Studio 2005 with several projects, including one C# project (the GUI) and one Intel Fortran project set up as a Dynamic-link Library (dll). My problem is that this fortran project has some calls to a static library (myFile.lib), witch is included as a resource in the project. It compiles, and runs smoothly on my computer, but when I take out the program and try to run it on any other computer, the dll fails. I also have other dll's that doesn't call any .lib files, and they works fine.
&lt;BR /&gt;&lt;BR /&gt;
If I comment out the calls to the .lib-file, it all works fine, but needless to say, I need the calls to work. Anyone have any idea's what I might do wrong? Is there any settings I need to do in Visual Studio to make sure the .lib is "included" in the dll?
&lt;BR /&gt;&lt;BR /&gt;
Fast reply's are appreciated :)</description>
      <pubDate>Wed, 06 Jun 2007 12:07:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838149#M56395</guid>
      <dc:creator>mini_minsaas</dc:creator>
      <dc:date>2007-06-06T12:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838150#M56396</link>
      <description>Please.... 
&lt;BR /&gt;
&lt;BR /&gt;
Anyone have any idea? I'm really desperate, and need an answer as soon as possible! Has anyone made a dll that uses a *.lib file? 
&lt;BR /&gt;
&lt;BR /&gt;
Does it work on other computers too?</description>
      <pubDate>Wed, 06 Jun 2007 19:34:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838150#M56396</guid>
      <dc:creator>mini_minsaas</dc:creator>
      <dc:date>2007-06-06T19:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838151#M56397</link>
      <description>&lt;P&gt;Maybe you give us some more information about the problem:&lt;BR /&gt;What error message? &lt;BR /&gt;What is the name of the .dll? &lt;BR /&gt;What is the name of the .lib?&lt;BR /&gt;Is the .lib you are using an import library (to a .dll) or a real static library?&lt;BR /&gt;...&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2007 10:19:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838151#M56397</guid>
      <dc:creator>joerg_kuthe</dc:creator>
      <dc:date>2007-06-07T10:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838152#M56398</link>
      <description>Seconded. "Dll fails" is a vague and utterly unusable problem description. &lt;BR /&gt;&lt;BR /&gt;Having a .lib linked into a dll is not anything special, and probably has nothing or little to do with the cause of your problem.&lt;BR /&gt;&lt;BR /&gt;I might venture a guess that the target computer is missing some of other required dll's, which you can verify using &lt;A href="http://www.dependencywalker.com"&gt;dependency walker&lt;/A&gt; on the target machine, but it's a wild stab in the dark. Another possibility are uninitialized variables somewhere in the code. The third... &lt;BR /&gt;&lt;BR /&gt;Morale: to be able to receive some help, you have to give us some data to work with.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jun 2007 11:27:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838152#M56398</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2007-06-07T11:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838153#M56399</link>
      <description>Thank you for that last reply. It solved my problem, at least found one solution.
&lt;BR /&gt;&lt;BR /&gt;
The tracer-program said that "LIBMMD.DLL" was missing, and that is correct, but...
&lt;BR /&gt;&lt;BR /&gt;
I have no idea what it is, why I need it, or most importantly, why Visual Studio doesn't copy this to my release/debug directory?!
&lt;BR /&gt;&lt;BR /&gt;
Edit: Is there any way to force Visual Studio to copy all needed dll's to the output directory?</description>
      <pubDate>Thu, 07 Jun 2007 21:26:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838153#M56399</guid>
      <dc:creator>mini_minsaas</dc:creator>
      <dc:date>2007-06-07T21:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838154#M56400</link>
      <description>Libmmd.dll is Intel's math library dll. It's likely absent on target computers which don't have IVF installed.&lt;BR /&gt;&lt;BR /&gt;The VS doesn't copy the dependent dll's to the output directory because that defeats the purpose of dll's, which is being shared among several applications (among other things). Instead, you have to redistribute the dll's to the target computer, either in a path's folder (like WindowsSystem32 or in the application's folder).&lt;BR /&gt;&lt;BR /&gt;You can avoid the dependency on Intel and VC++ dll's by means of static linking against the run-time libraries -- go to Project properties/Fortran/Libraries/Run-time library and pick one of non-dll versions; then rebuild and check the dependencies with Dependency Walker. However, note that, in presence of a .lib, it's not guaranteed to work... (if you still see the dependency on Libmmd.dll after the rebuild, please report back).&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Jun 2007 07:04:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838154#M56400</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2007-06-08T07:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838155#M56401</link>
      <description>Thanks! That solved the problem :)</description>
      <pubDate>Fri, 08 Jun 2007 07:17:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838155#M56401</guid>
      <dc:creator>mini_minsaas</dc:creator>
      <dc:date>2007-06-08T07:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838156#M56402</link>
      <description>&lt;P&gt;Jugoslav,&lt;/P&gt;
&lt;P&gt;If I link to thenon-DLL libraries, as you suggest, can I completely eliminate having to distribute runtime libraries with my App? I have been routinely distributinglibifcoremd.dll,libifcorert.dll, libifportmd.dll and libmmd.dll.&lt;/P&gt;
&lt;P&gt;Thanks, David&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2007 01:13:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838156#M56402</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2007-06-11T01:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838157#M56403</link>
      <description>Short answer: Yes.&lt;BR /&gt;&lt;BR /&gt;Long answer: Dll version of the RTL, however, is necessary in the following cases:&lt;BR /&gt;* if the calling Fortran application and the Fortran dll share I/O unit numbers and I/O units&lt;BR /&gt;* if the allocation and deallocation of the same variables happens in different modules (.exe and .dll)&lt;BR /&gt;* (maybe something else I forgot)&lt;BR /&gt;&lt;BR /&gt;In all other cases, you may statically link with the RTL, obviating the need for redistribution of libif*.dll, (and obviously, on the expense of executable's size).&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Jun 2007 12:00:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838157#M56403</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2007-06-11T12:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838158#M56404</link>
      <description>&lt;P&gt;Jugoslav,&lt;/P&gt;
&lt;P&gt;I think I satisfy all the requirements for static linking. However, when I try to link against static libraries, I get more than 200 errors against the Intel libraries ...&lt;/P&gt;&lt;FONT size="3"&gt;
&lt;P&gt;libifport.lib(random.obj) : error LNK2001: unresolved external symbol __fltused&lt;/P&gt;
&lt;P&gt;Compiler Options are&lt;/P&gt;
&lt;P&gt;/nologo /Oy- /fpscomp:nolibs /stand:f95 /warn:declarations&lt;/P&gt;
&lt;P&gt;/warn:unused /warn:truncated_source /module:"c:DevModules"&lt;/P&gt;
&lt;P&gt;/object:"c:DevIntermed/" /traceback /check:bounds /check:uninit /check:format &lt;/P&gt;
&lt;P&gt;/check:output_conversion /libs:static /threads /winapp /c&lt;/P&gt;
&lt;P&gt;Have I missed something?&lt;/P&gt;
&lt;P&gt;Thanks, &lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;&lt;/FONT&gt;</description>
      <pubDate>Wed, 13 Jun 2007 02:13:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838158#M56404</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2007-06-13T02:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using .lib from a .dll</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838159#M56405</link>
      <description>Hmm. __fltused comes from libcmt.lib -- the VC++ static run-time library -- which ought to be pulled in in any case. &lt;BR /&gt;&lt;BR /&gt;Why is that /fpscomp:nolibs there? However, it doesn't make a difference for me.&lt;BR /&gt;&lt;BR /&gt;I think that linker options would be more interesting -- do you perhaps have an /ignore: left over from the ancient times? In any case, try linking with /verbose (Linker/General/Show progress) and try to deduce why libcmt.lib is not there.&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jun 2007 07:02:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-lib-from-a-dll/m-p/838159#M56405</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2007-06-13T07:02:11Z</dc:date>
    </item>
  </channel>
</rss>

