[CMake] find_library can't find dll in system32 directory
Stiaan Gerber
sgerber at sun.ac.za
Wed Jun 22 06:43:24 EDT 2011
Hi all
On 64-bit Windows 7
I am trying to use the find_library command to locate a 64-bit mpich2
dll in the C:/Windows/System32 directory. I use
find_library (MPI_LIB fmpich2g PATHS "C:/Windows/System32")
This command fails to find the dll. However, if I also install 32-bit
mpich2 so that C:/Windows/SysWOW64/fmpich2g.dll exists,
the command works and MPI_LIB is set to C:/Windows/System32/fmpich2g.dll
which is actually my 64-bit dll.
So the way I see it, find_library can only "find" my 64-bit dll if a
corresponding 32-bit dll is present. I have seen a previous thread on
this subject (http://www.mail-archive.com/cmake@cmake.org/msg29248.html)
which explains that Windows actually reports the path
of the 32-bit dll as C:/Windows/System32, but this does not solve my
problem:
How do I correctly find the 64-bit version of a dll in
C:/Windows/System32 without the 32-bit dll existing?
Any insights would be much appreciated.
Kind regards
Stiaan Gerber
More information about the CMake
mailing list