Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Problem with a dll

Brian_Allison
Beginner
1,113 Views
I don't know if this is the right place or not for this, but here goes.
We have a program that uses a dll created with IFC. It works fine on our computers, XP and Win 7.
We have some clients over seas that are encountering a problem with the dll. THey are getting an error message.

"DLL Loading Error: relap5l.dll"

Thats it! The next thing they are asked to do is click OK.

Any ideas?

0 Kudos
12 Replies
Steven_L_Intel1
Employee
1,113 Views
That error message would appear to be coming from the application. I would guess that the application tries to dynamically load this DLL using LoadLibrary and it fails. It is not coming from Intel Fortran itself.
0 Kudos
Brian_Allison
Beginner
1,113 Views
but why would it be only on certain machines?
0 Kudos
Steven_L_Intel1
Employee
1,113 Views
The DLL being loaded may have dependencies on other DLLs that are not present on some systems. Use Dependency Walker to check.
0 Kudos
Brian_Allison
Beginner
1,113 Views
It looks like in dependency walker that the dll is relying on two lib files from INTEL.
LIBIFCOREMD.DLL and LIBMMD.DLL
dependant dll
So I figured out that machines that do not have the IFC installed on them they get the DLL error. I copied the two LIB DLL files into the same folder as the main program on a machine that was gettign the error, and now the error is gone.
Why is my dll relying on the IFC dll's.
0 Kudos
Steven_L_Intel1
Employee
1,113 Views
Because, by default, when you build a DLL it links to DLL libraries. You can change that if the DLL will not be called from Fortran. Or you can provide our redistributable installer.
0 Kudos
Arjen_Markus
Honored Contributor II
1,113 Views
How do you force this? We encounter the very same problem: the DLL is called by a Java program in our case.

Regards,

Arjen
0 Kudos
anthonyrichards
New Contributor III
1,113 Views
I think it means that, when you specify to build a DLL, you can choose the option to satisfy all external dependencies by linking to the static library versions rather than the DLL versions. That way all external dependency code should become part of your DLL (which will of course be bigger as a consequence) and the DLL will not then need to link in other DLL's in order to load the code for the external dependencies.

This presupposes that there exist static versions of all of the DLLs on which your Fortran code depends.
0 Kudos
Arjen_Markus
Honored Contributor II
1,113 Views
Yes, but I am especially interested in suppressing the dependencies to the DLL versions of the Intel runtime
libraries. If the program depends on the DLL versions, we need to redistribute them, complicating the distribution mechanism (some of our clients have a very restricted environment!)

I think there is a compile/link option for that, but I have not found it yet in the online documentation.

Regards,

Arjen
0 Kudos
IanH
Honored Contributor III
1,113 Views
Consider reading the help for the /libs:static option.
0 Kudos
Arjen_Markus
Honored Contributor II
1,113 Views
Thanks, I have read it - the phrase "search for unresolved references" did not strike me as
belonging to the option I needed. Reading the lemma for the option /libs:static does me confidence
that that is what I should use.

Regards,

Arjen
0 Kudos
Steven_L_Intel1
Employee
1,113 Views
If you are building in Visual Studio, you want Fortran > Libraries > Use Runtime Libraries > Multithreaded.
0 Kudos
DavidWhite
Valued Contributor II
1,113 Views
I use the Multithreaded option (/libs:static /threads) and I do not need to provide any runtime libraries to my users - just the DLL.

David
0 Kudos
Reply