[CMake] Impossible to link SDLmain and LibXml2
julien.plu at redaction-developpez.com
julien.plu at redaction-developpez.com
Tue Mar 6 14:58:43 EST 2012
Hi,
I have a problem with cmake not to compile but to link my .exe.
I use SDL, OpenGL, FMOD, LibXml2 and a personal library. But when I try to
compile my program LibXml2 and SDLmain are not include into the command line
to link my .exe.
Enclosed my CMakeList.txt and CMakeCache.txt and here the line for the
linker into build.make:
Output/shootspace.exe: C:/MinGW/lib/libSDL.dll.a
Output/shootspace.exe: C:/MinGW/lib/libfmodex.a
Output/shootspace.exe: CMakeFiles/shootspace.dir/build.make
Output/shootspace.exe: CMakeFiles/shootspace.dir/objects1.rsp
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR)
--red --bold "Linking CXX executable Output/shootspace.exe"
"/c/Program Files (x86)/CMake 2.8/bin/cmake.exe" -E remove
-f CMakeFiles/shootspace.dir/objects.a
/C/MinGW/bin/ar.exe cr CMakeFiles/shootspace.dir/objects.a
@CMakeFiles/shootspace.dir/objects1.rsp
/C/MinGW/bin/g++.exe -Wl,--whole-archive
CMakeFiles/shootspace.dir/objects.a -Wl,--no-whole-archive -o
Output/shootspace.exe -Wl,--out-implib,Output/libshootspace.dll.a
-Wl,--major-image-version,0,--minor-image-version,0
-Lsource/lib/gtl/lib/mingw -lmingw32 /C/MinGW/lib/libSDL.dll.a -lpthread
-lglu32 -lopengl32 /C/MinGW/lib/libfmodex.a -lgtl -lkernel32 -luser32
-lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
As you can see, LibXml2 library and SDLmain library are found in
CMakeCache.txt but not include in build.make because –lxml2 and –lSDLmain
are missing.
Why ? I do something wrong in my CMakeList.txt ?
Thanks in advance for your help.
Cheers.
----------------------------------------------------------------------------
-----------------------------------------------
Julien Plu
Etudiant en 2ème année de Master Ingénierie en Intelligence Artificielle à
l’Université Montpellier 2.
Mes projets Web sémantique : http://data.lirmm.fr
Page personnelle : http://jplu.developpez.com
Responsable de la rubrique Web sémantique
<http://web-semantique.developpez.com/> de Developpez.com.
Fichier FOAF (version RDF) : http://jplu.developpez.com/julien
Fichier FOAF (version RDFa) : http://jplu.developpez.com/julien.html
Adresse mail personnelle : julien.plu at redaction-developpez.com
Adresse mail universitaire : julien.plu at etud.univ-montp2.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120306/faa34c21/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeCache.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120306/faa34c21/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120306/faa34c21/attachment-0003.txt>
More information about the CMake
mailing list