Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
14 Views

release dll linked with 64-bit libraries rather than 32 bit

When I build my release fortran .dll using Intel(R) Visual Fortran Compiler for applications running on IA-32,
version 16.0.2 Package ID: w_comp_lib_2016.2.180 under VS 2013, dependency walker shows that I am linked with the
64 bit libraries despite having selected the x86 solution platform.
 
If I edit the system path environment variable to remove the references to the intel fortran 64  bit libraries, I get a .dll that references the intel 32 bit libraries.
 
Editing the path variable seems extreme....  Is there a way to force linking with the proper libraries?
0 Kudos
1 Reply
Highlighted
14 Views

Ignore this - it's Dependency Walker ignoring how Windows looks for DLLs. Windows x64 will skip over any "wrong architecture" DLLs as it searches PATH. It mystifies me why Dependency Walker has kept this confusing misbehavior for so long.

Note that you don't "link with DLLs". You link to an export library that gives a DLL name. When you run the EXE, Windows will search in various places for a DLL with that name. (This changes a bit if the DLL was in a shared assembly, but the basic situation is the same.)

Bottom line - ignore Dependency Walker complaining about a wrong-architecture DLL unless your program doesn't run.

Retired 12/31/2016
0 Kudos