- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good afternoon.
I have a couple of DLLs developed on a Windows XP machine with an old compiler (of which I have no information).
These DLLs where then called from a VB.NET application.
From the documentation a colleague left me, I know that the only prerequisite for the right running of these DLLs is the presence of the "DFORRT.DLL" in the same folder where the DLL is.
Now we have passed to an Intel Visual Fortran Composer XE 2011 and it seems that something is changed:
- "DFORTT.DLL" is not required anymore; instead, sometimes "libmmd.dll", sometimes "msvcr80.dll" and other times "libifcoremd.dll" are required.
- the way parameters are passed to the DLLs seems different too: always from the documentation of my colleague, I have to pass every parameter "ByRef", also if it is a simple variable and not an array or a matrix.
So I have these questions:
- is there a way to determine a minimum collection of DLLs required to have our DLLs (same code, only the compiler is changed) run correctly?
- the compiler is run on a 64bit enviroment while the production environment is a 32bit and so we have set the compiler to 32bit mode; is there anything else we have to do or to pay attention to?
I have another problem too: a new DLL, written and compiled under Intel Visual Fortran Composer XE 2011 always on a 64bit PC, if called on a 32bit windows XP PC or on a 32bit windows 7 PC(whit a 64bit processor) throw a "Side-by-Side configuration information" error with code 14001.
With the same DLL and the same calling code, on another 32bit windows 7 PC, is all ok and the DLL is called correctly.
Any hint?
Many thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do I understand correctly that on both of the systems where you provided the DWI files, the DLL fails to load? In both cases it cannot find the right MSVCR80.DLL. You should be able to fix this by installing the Visual C++ 2005 Runtime Redistributables package for X86 on these systems.
I see that DW also claims that the "side by side assembly information" for your DLL contains errors. My guess is that this would be fixed by installing the redistributable package - did you try that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just tried to install the package from the link but it's always the same.
There were already two similar packages so I uninstalled all of them, rebooted, installed only the package, rebooted and run Dependency Walker.
The result seems the same; attached here there is the dwi.
Can it be, at this point, a compiling problem.
P.S.
Today I can try only on one of two PC. Tomorrow Il'' try on the other one.
Many Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would you please post the buildlog.htm from the Release folder after a project build? In particular I want to see the link options.
Did you try copying MSVCR80.DLL anywhere on the target system? You should not do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know what's causing the proiblem, but I know how to fix it in this case. In your DLL project, select Properties > Fortran > Libraries and change the setting for Runtime Libraries to "Multithread" (not Multithread DLL). Rebuild the DLL. This will remove the dependency on any other non-system DLLs. It is safe to do if the DLL is not called from Fortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good evening.
Checking this solution I've had a surprise: the setting was already set to "Multithread". I've also made an experiment: setting it to Multithread DLL, the build log matches perfectly with the first one. Maybe the compiler can't build the DLL "Multithread" due to other dependencies?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you didn't look in the right place, as the build log you attached had the "Multithread DLL" setting enabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry: you were right.
I was watching the right setting but for the wrong profile: "Debug" had "Multithread" while "Relase" had "Multithread DLL".
Now the DLL is working right!!
Thank you!
If I can I have one last question: can you tell me in a few words what's the difference between the two settings?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Multithread links against the static library form of the run-time libraries, which means that all of the code used from those libraries is included in your executable or DLL. Multithread DLL means that the DLL form of the libraries is linked against, putting a "pointer" in your EXE/DLL and requiring that the correct library DLL be present when the program is run.
The default for building DLLs is to link against the DLL libraries - one reason for this is that if you use the static libraries and then your DLL is called by a Fortran program, there will be two copies of the Fortran libraries in the memory space that don't talk to each other. This can cause I/O and memory allocation errors.
When your Fortran DLL will not be called from Fortran, it is generally safe to link it against the static libraries. This also lets you escaspe what Microsoft csalls "DLL Hell", where you have to worry about multiple versions of DLLs. Microsoft tried to fix this with their shared assembly concept, but it introduced other issues similar to what you had. Most of the time it works well. Microsoft has advised us not to move to shared assemblies, but they don't seem to have an alternative.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page