Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28602 Discussions

Delay loaded dll's not working on non-developer PC's

jsschofield
Beginner
339 Views
Hi,

I have a Fortran executable project that calls a Fortran library project that can then use two delay loaded Fortran dll's. (I know that's convoluted, but there's a reason that I won't go into...) On my development machine things work fine: I can run through in the debugger, stepping into the dll's and then back out into the main code. I can also run fromthe command line on my machine, and the dll functionality is fine, so I thought I had done everything right...

However, when I try on a different PC, I get a runtime failure "Severe (172): Program Exception exception code = 0x7e (126)" at the first call to a dll function. All I have been able to find on this is that it is an OS error code.

I'm developing in Visual Studio 2008 under Vista. The PC on which I get the crash is identical to the development machine except for not having VS.

Can anyone help please?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
339 Views
Your DLL is, by default, linked to DLL forms of the Intel Fortran and Microsoft C++ run-time libraries. This requires that those DLLs be present on the target system in a place that Windows knows how to look for them. For the Microsoft C++ DLLs, you need to install the proper Visual C++ redistributables package for the version of Visual Studio you're using. For the Fortran DLLs, you need to copy one or more of the DLLs in the compiler's LIB folder. Dependency Walker can tell you which ones.

Make sure that your DLL is built as a Release configuration. Debug DLLs are not redistributable.
0 Kudos
jsschofield
Beginner
339 Views

Thanks Steve,
I had the compiler's lib folder DLL's on the target machine, but did notrealise that a debug configuration was not redistributable, so that'll be it. When it worked on my machine from the command prompt I figured I had done everything right...I'll try a Release build Monday UK time!
Cheers,
James
0 Kudos
Reply