- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an application that calls three Fortran DLLs and one C++ DLL. This app (and the supporting DLLs) compiles, links and runs successfully on the 64 bit platform (Vista64) in both Platform: x64 and Platform: Win32IVF modes.
When I copy the application (and the 32 bitruntime .libs) to a 32bit platform (Vista32) it fails to run. I have checked the tools >> options >>IVF compilers selections and the selected compiler and libraries are set up correctly for the two platforms.
When I run "Dependency Walker" on the application it shows that the application and DLLs I create are x86 BUT the runtime support libraries [libifcoremd, libifportmd,libmmd]are show as x64. This tells me that at runtime the application will be looking for and attempting to use the 64bit version of the three runtime libraries -- which is not what is loaded on the target machine.
What am I missing here ?
Thanks -- Tom
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It turns out that Windows is smarter than that and skips DLLs for the "wrong" architecture (at least it does this on a 64-bit system - not on a 32-bit system.)
The workaround is to add the 32-bit DLLs to PATH. RIght click on My Computer, select Properties, Advanced, Environment Variables. Under system variables, select PATH and click Edit. Add at the end of the path:
;%IFORT_COMPILER11%binia32
and click OK, OK, OK. (Don't forget the leading semicolon.)
We will fix this in a future update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It turns out that Windows is smarter than that and skips DLLs for the "wrong" architecture (at least it does this on a 64-bit system - not on a 32-bit system.)
The workaround is to add the 32-bit DLLs to PATH. RIght click on My Computer, select Properties, Advanced, Environment Variables. Under system variables, select PATH and click Edit. Add at the end of the path:
;%IFORT_COMPILER11%binia32
and click OK, OK, OK. (Don't forget the leading semicolon.)
We will fix this in a future update.
Steve,
Thank you for the prompt response. Unfortunately, your suggested solution did not solve the problem. Dependency Walker still shows that my EXE and DLLs require the 64 bit run-time support dlls and the exe fails to load on the 32 bit machine.
I would think that the link step is where I need to have the associated 32bit run-time .libfor the linker to get it right. As it is now, the linker appears topick up the 64bit .lib for the three run-time dlls [libifcoremd, libifportmd and libmmd].
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, I misread your post. You said you were copying the EXE to a 32-bit system and I thought you were running it on the x64 system.
Did you build the project as a Win32 platform configuration? It doesn't sound like you did.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, I misread your post. You said you were copying the EXE to a 32-bit system and I thought you were running it on the x64 system.
Did you build the project as a Win32 platform configuration? It doesn't sound like you did.
Steve,
I built the EXE and my three Fortran DLLs and one C++ DLL using the Win32 Platform -- checked this several times. The EXE and DLLs function perfectly on the x64 system in both platform configurations [x64 and Win32]. It is only when I try to run on a 32-bit system the the EXE fails to load [exception error].
When I check the 32-bit EXE and 32-bit DLLs with Dependency Walker all dependencies are 32-bit EXCEPT the libifcoremd, libifportmd and libmmd which are reported as x64.
I have tried explicity adding the 32-bit libs to the import link step -- same results. Tried excluding the 64-bit libs in the link -- same results.
When I build the EXEand DLL on the 32-bit machine [same version of the compiler and VS] -- all is well. [and in case anyone is wondering -- yes I have multiple licenses!]
Thank you,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Start > All Programs > Intel Software Development Tools > Intel Visual Fortran Compiler 11.x.xxx > Build Environment for applications running on IA-32
- From this command prompt, run Dependency Walker
- In DW, open your EXE.
If you are running the program on a 32-bit system, that system needs to have either Fortran installed or the IA-32 redistributable package, which you can download from the Intel Registration Center.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Start > All Programs > Intel Software Development Tools > Intel Visual Fortran Compiler 11.x.xxx > Build Environment for applications running on IA-32
- From this command prompt, run Dependency Walker
- In DW, open your EXE.
If you are running the program on a 32-bit system, that system needs to have either Fortran installed or the IA-32 redistributable package, which you can download from the Intel Registration Center.
Steve,
Issue resolved by excluding MSVCRT library in the link step for the FORTRAN DLLs vice excluding LIBCMT. Not exactly sure how (nor why) this enable the ability to run this code on a 32-bit machine after building it on a 64-bit machine. Bothx64 and Win32 builds work fine on the 64bit machine they are compiled and linked on with excluding LIBCMT on the DLL link step.
Thank you,
Tom
- 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
Steve,
The application "failed to run" with an exception immediately at launch. The windows event log is pasted below.
Faulting application sails4.exe, version 0.0.0.0, time stamp 0x4a5e6185, faulting module ntdll.dll, version 6.0.6001.18000, time stamp 0x4791a7a6, exception code 0xc0150002, fault offset 0x00009cac, process id 0x1ecc, application start time 0x01ca05a51c99fd61.
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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