[CMake] MinGW generator: Avoiding -Lc:\windows\system32 on linking
Johan Seland
johans at ifi.uio.no
Fri Sep 15 05:34:13 EDT 2006
Hello.
I have been a happy user of CMake for the last couple of monts (both
on Linux and using MinGW on WinXP), but have currently run into an
annoying problem.
I have to do a project using DirectX and need to link with GDI32,
WINMM and D3D9.
I have used the reimp tool to generate Mingw libs for the DX9 libraries.
Cmake 2.4 using the MinGW Makefile Generator compiles my source files
perfectly, but during linking it adds -Lc:\windows\system32 to the
command line, which causes error in the form of "multiple definition
of `_onexit'" as well as many undefined references. However, if I
manually remove the -Lc:\windows\system32 flag from the linker command
line, my program links and runs as it should.
Is there anyway to avoid getting this flag into the generated
makefiles? Setting LINK_DIRECTORIES to empty or a dummy path does not
seem to help.
--
Regards Johan Seland
PhD Student
Center of Mathematics for Applications, University of Oslo
More information about the CMake
mailing list