<?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 Re: DLL, dependecies, ad maybe more... in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850555#M65789</link>
    <description>Can't say, really, without (perhaps) sitting on your system and investigating. Usually I find that Dependency Walker is a good analysis tool for such problems. I would suggest using that on each of your DLLs and compare the results.&lt;BR /&gt;</description>
    <pubDate>Fri, 22 Feb 2008 14:54:09 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2008-02-22T14:54:09Z</dc:date>
    <item>
      <title>DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850544#M65778</link>
      <description>Dear IVF users.&lt;BR /&gt;&lt;BR /&gt;I'm trapped in DLL Hell. I wrote a VBA code running on top of ArcMap (ESRI), which calls several DLLs built in IVF10/VS2005. On some systems, everything works all right, but on others, one DLL generates the dreaded VBA error "file not found" (while other DLLs dont).&lt;BR /&gt;&lt;BR /&gt;Now:&lt;BR /&gt;&lt;BR /&gt;All the DLLs where built using exactly the same project options, all of them in release mode.&lt;BR /&gt;&lt;BR /&gt;All the dependencies appear to be satisfied (libifcoremd.dll, libifportmd.dll, libmmd.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, Microsoft.VC80.CRT.manifest are there).&lt;BR /&gt;Checking dependencies with DependencyWalker shows no problems. The only difference I can see is that the working DLL depends on LIBIFCOREMD.DLL and LIBMMD.DLL, while the non-working DLL depends on LIBIFCOREMD.DLL and LIBIFPORTMD.DLL.&lt;BR /&gt;&lt;BR /&gt;All the DLLs have the manifest embedded, and manifests are identical.&lt;BR /&gt;&lt;BR /&gt;The machines where the problem occurs run WinXP SP2 (32 bit). I tried the whole thing on a clean Win XP SP2 machine (with no other software installed): no problems.&lt;BR /&gt;&lt;BR /&gt;I checked the versions of all the VC DLLs, and they look consistent.&lt;BR /&gt;&lt;BR /&gt;I then used FileMon to try to sort out the problem. I so discovered that the working DLL, after being loaded, rummages a bit inside the WinSxs folders, and then loads LIBIFCOREMD.DLL, LIBMMD.DLL, LIBFPORT.DLL and the VC DLLs.&lt;BR /&gt;The non-working DLL instead, after being loaded, rummages a bit inside the WinSxs folders, and then loads the NTDLL.DLL, not even trying to look for the Fortran redistributable DLLs it should load. It doesnt find them because it doesnt even look for them!&lt;BR /&gt;&lt;BR /&gt;Lastly, I try building the DLLs with IVF9 on VS2003: no luck, same problem on same machines.&lt;BR /&gt;&lt;BR /&gt;What did I do wrong? Why one of my DLLs works all right everywhere and the other fails on some systems?&lt;BR /&gt;&lt;BR /&gt;Thanks for your help&lt;BR /&gt;Alberto&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2008 15:33:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850544#M65778</guid>
      <dc:creator>bertazza</dc:creator>
      <dc:date>2008-02-13T15:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850545#M65779</link>
      <description>I can't explain the VS2003-build problems. Have you tried opening the DLLs with &lt;A href="http://dependencywalker.com/"&gt;Dependency Walker&lt;/A&gt; to see what it says?&lt;BR /&gt;&lt;BR /&gt;For the VS2005 issues, try installing the &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&amp;amp;displaylang=en"&gt;VS2005 redistributables installer&lt;/A&gt;.&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2008 16:40:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850545#M65779</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-13T16:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850546#M65780</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;thank you for your help!&lt;BR /&gt;&lt;BR /&gt;I did as you advised, with no luck. Even installing the VS2005 redist package, the error persists for one and only one DLL.&lt;BR /&gt;&lt;BR /&gt;As I mentioned in my first post, Dependency Walker shows no Errors, only the usual Warnings.&lt;BR /&gt;&lt;BR /&gt;Any further suggestion?&lt;BR /&gt;&lt;BR /&gt;Thanks again&lt;BR /&gt;Alberto&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2008 15:40:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850546#M65780</guid>
      <dc:creator>bertazza</dc:creator>
      <dc:date>2008-02-14T15:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850547#M65781</link>
      <description>My usual advice in such cases is to write a small Fortran test program that calls the DLL routine and try running that to see if you get a meaningful error message. The Fortran code doesn't have to actually execute the call.&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2008 15:55:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850547#M65781</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-14T15:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850548#M65782</link>
      <description>Steve.&lt;BR /&gt;&lt;BR /&gt;If I get it right: I write a simple executable fortran app that calls the problematic DLL, and I should get some useful error msg.&lt;BR /&gt;&lt;BR /&gt;But what do you mean when you say "the Fotran code doesn't have to actually execute the call?".&lt;BR /&gt;&lt;BR /&gt;Thanks again&lt;BR /&gt;Alberto&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2008 16:38:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850548#M65782</guid>
      <dc:creator>bertazza</dc:creator>
      <dc:date>2008-02-14T16:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850549#M65783</link>
      <description>What you are testing is the ability to load the EXE and DLL, not make the calls. You'll either get an error starting the EXE or not. You can put a STOP statement before the call to the DLL routine if desired.&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2008 17:01:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850549#M65783</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-14T17:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850550#M65784</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;sorry about bothering you with dumb questions. Be patient...&lt;BR /&gt;&lt;BR /&gt;I wrote this simple code that calls my dll (GridToDxf.dll):&lt;BR /&gt;-----------------------------------&lt;BR /&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;program test1&lt;BR /&gt;&lt;BR /&gt;use kernel32&lt;BR /&gt;implicit none&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;INTEGER :: hLib, iSt&lt;BR /&gt;character(256) :: fileCommand&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;INTERFACE&lt;BR /&gt; SUBROUTINE sub(fileCommand)&lt;BR /&gt; character(256) :: fileCommand&lt;BR /&gt; END SUBROUTINE&lt;BR /&gt;END INTERFACE&lt;BR /&gt;POINTER(lpfnfunc,sub)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;fileCommand = 'command_GridToDXF.txt'&lt;BR /&gt;&lt;BR /&gt;hLib = LoadLibrary("gridtodxf.dll"C)&lt;BR /&gt;lpfnfunc = GetProcAddress(hLib,"RAS_TO_DXF"C)&lt;BR /&gt;pause&lt;BR /&gt;&lt;BR /&gt;CALL sub(fileCommand)&lt;BR /&gt;iSt = FreeLibrary(hLib)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;end program test1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;----------------------------&lt;BR /&gt;Now, this program works, providing the GridToDXF.dll file and its dependencies are there. But if those files are not there, I get an access violation error only when I actually call the DLL, not when I start di EXE as you said it should happen.&lt;/P&gt;&lt;P&gt;I'm clearly doing something wrong...&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;BR /&gt;Alberto&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2008 10:15:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850550#M65784</guid>
      <dc:creator>bertazza</dc:creator>
      <dc:date>2008-02-15T10:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850551#M65785</link>
      <description>This isn't what I meant for you to do - it won't provide any more information. You get the access violation because you do not check for an error from LoadLibrary or GetProcAddress.&lt;BR /&gt;&lt;BR /&gt;What I was suggesting was that you write a program such as this:&lt;BR /&gt;&lt;BR /&gt;program test&lt;BR /&gt;external RAS_TO_DXP&lt;BR /&gt;!DEC$ ATTRIBUTES ALIAS:"RAS_TO_DXP" :: RAS_TO_DXP&lt;BR /&gt;accept *, i&lt;BR /&gt;if (i == 999999) call RAS_TO_DXP&lt;BR /&gt;end&lt;BR /&gt;&lt;BR /&gt;Compile this and link it against the .LIB created when you built the DLL. Now run it. Enter 0 at the prompt if you get that far.&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:39:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850551#M65785</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-15T14:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850552#M65786</link>
      <description>All right Steve.&lt;BR /&gt;&lt;BR /&gt;I finally managed to build that little program on your template. I put it in the same folder where the faulty DLL was. The program worked, but that same DLL gave the error "Error 53 - file not found" when called from inside VBA.&lt;BR /&gt;&lt;BR /&gt;Since other DLLs did not present the problem, I started suspecting that the problem could be in the Fortran code. Therefore, I created a new empty DLL, and added to it chunks of code from the faulty DLL. I indeed found that the problem "Error 53 - file not found" in VBA was due to some offending code.&lt;BR /&gt;&lt;BR /&gt;In one of 2 faulty DLLs, the thing seems to be related to some write statements. I couldn't get more precise, due to the code complexity. But in the other DLL I managed to spot out the only line of code responsible for the problem:&lt;BR /&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Class = aint(0.9999 + 10**(rmodulo - aint(rmodulo))) * 10**aint(rmodulo)&lt;FONT face="Arial"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This line is located inside a plain subroutine. Class is an global integer, rmodulo is a local real. I can provide the remaining code if needed.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;By commenting this single line of code, the problem "file not found" disappeared! I've check and re-checked.&lt;/P&gt;&lt;P&gt;As I said, this only happens on some machines (all of them running Win XP SP2). Could it be a problem of VBA? Or maybe, it's something related to implicit functions (like aint)?&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alberto&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2008 08:57:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850552#M65786</guid>
      <dc:creator>bertazza</dc:creator>
      <dc:date>2008-02-22T08:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850553#M65787</link>
      <description>It sounds to me as if VBA is unable to locate the libifcoremd.dll or libifcorert.dll, depending on how you built your DLL. Removing statements that cause calls to the RTL mean that the RTL DLL is not needed.&lt;BR /&gt;&lt;BR /&gt;Remember that VBA has to look in the "standard locations" for the run-time DLLs - it does not know to look in the same folder as your DLL or in places you may have set for PATH on a command prompt.&lt;BR /&gt;&lt;BR /&gt;Check the system PATH environment variable (Right click on My Computer, Properties, Advanced, Environment Variables) and make sure that the system PATH variable includes a folder where the IVF run-time DLLs are placed.&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2008 14:25:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850553#M65787</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-22T14:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850554#M65788</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;I've already tried adding the DLL's folder in the PATH system variable, it doesn't help.&lt;BR /&gt;&lt;BR /&gt;The things that are puzzling me are:&lt;BR /&gt;- why is that very line in the DLL code causing the error? There are several other lines calling the same intrinsic functions in the code.&lt;BR /&gt;- why only 2 out of several DLLs cause the problem? They should at least behave consistently. They've been compiled with the same parameters, same compiler, same VS version.&lt;BR /&gt;&lt;BR /&gt;I'm baffled and befuddled&lt;BR /&gt;Alberto&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2008 14:45:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850554#M65788</guid>
      <dc:creator>bertazza</dc:creator>
      <dc:date>2008-02-22T14:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850555#M65789</link>
      <description>Can't say, really, without (perhaps) sitting on your system and investigating. Usually I find that Dependency Walker is a good analysis tool for such problems. I would suggest using that on each of your DLLs and compare the results.&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2008 14:54:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850555#M65789</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-22T14:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850556#M65790</link>
      <description>Is there any chance of avoiding the problem by linking the libraries statically ?&lt;BR /&gt;&lt;BR /&gt;I will anyway check the DLLs more thoroughly with Dependency Walker, and see if I figure something out.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help&lt;BR /&gt;Alberto&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2008 16:39:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850556#M65790</guid>
      <dc:creator>bertazza</dc:creator>
      <dc:date>2008-02-22T16:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850557#M65791</link>
      <description>Yes - as long as no Fortran code is calling your DLL that will work. In the Fortran &amp;gt; Libraries property page, change the Use Run-Time Library to "Multithreaded".&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2008 18:02:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850557#M65791</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-02-22T18:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: DLL, dependecies, ad maybe more...</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850558#M65792</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;just so you know: strangely enough, linking the libraries statically didn't help either :(&lt;BR /&gt;&lt;BR /&gt;I'll keep trying, and see if I find something out.&lt;BR /&gt;&lt;BR /&gt;Alberto&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Feb 2008 15:11:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/DLL-dependecies-ad-maybe-more/m-p/850558#M65792</guid>
      <dc:creator>bertazza</dc:creator>
      <dc:date>2008-02-25T15:11:08Z</dc:date>
    </item>
  </channel>
</rss>

