[CMake] Linking Problems w. CMake 2.4 and MinGW32

hendrik at darkon.info hendrik at darkon.info
Fri Sep 1 03:25:26 EDT 2006


Dear fellow CMake users,

although I am aware of the fact that the following issue was already discussed by some fellows several months ago on this list, no solution was found there, so I'm just asking this again:

When generating Makefiles with CMake 2.4 for the MingW environment, the build process runs fine until it gets to linkage of an executable. CMake insists on adding the full file name for external libraries, while ld expects the -l parameter not to contain any file extension or prefix. E.g. for linkage with boost_regex-mgw.lib, the correct calling syntax would be -lboost_regex-mgw, but CMake produces -lboost_regex-mgw.lib, which leads to
an error.

I haven't found a solution for this so far. Explicitly setting the appropiate library variable to DRIVE:\PATH\libname instead of DRIVE:\PATH\libname.lib or DRIVE:\PATH\libname.dll does not work, since CMake appends the .lib extension here by itself.

Anyone here could provide me with a solution for this?


More information about the CMake mailing list