Hendrik Sattler wrote:
Ok, I have the files

libnspr4.dll
libnspr4.lib
libnspr4_s.dll

where the last one should be the static library ("_s").

No. A DLL is a "dynamic link library". It may be linked statically
itself but that doesn't mean that you can link statically against it.

OK, then libnspr4_s.dll must be some other lib, maybe a debug version.

Anyway, changing the CMakeLists line
  TARGET_LINK_LIBRARIES(testPR nspr4 Ws2_32)
(with which linking works fine)) just to
  TARGET_LINK_LIBRARIES(testPR nspr4_s Ws2_32)

prevents the linker from finding the library:


D:\MinGW\bin\g++.exe CMakeFiles\testPR.dir\PRifdefd.cpp.obj -o testPR.exe -Wl,--out-implib,libtestPR.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -LD:\nspr-4.6\lib
-lnspr4_s -lWs2_32
D:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lnspr4_s

(?)
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to