<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>I have a problem with cmake not to compile but to link my .exe.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>Enclosed my CMakeList.txt and CMakeCache.txt and here the line for the linker into build.make:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>Output/shootspace.exe: C:/MinGW/lib/libSDL.dll.a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Output/shootspace.exe: C:/MinGW/lib/libfmodex.a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Output/shootspace.exe: CMakeFiles/shootspace.dir/build.make<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Output/shootspace.exe: CMakeFiles/shootspace.dir/objects1.rsp<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold &quot;Linking CXX executable Output/shootspace.exe&quot;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                &quot;/c/Program Files (x86)/CMake 2.8/bin/cmake.exe&quot; -E remove -f CMakeFiles/shootspace.dir/objects.a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                /C/MinGW/bin/ar.exe cr CMakeFiles/shootspace.dir/objects.a @CMakeFiles/shootspace.dir/objects1.rsp<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                /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<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>As you can see, LibXml2 library and SDLmain library are found in CMakeCache.txt but not include in build.make because &#8211;lxml2 and &#8211;lSDLmain are missing.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>Why ? I do something wrong in my CMakeList.txt ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks in advance for your help.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>Cheers.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:FR'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:FR'>---------------------------------------------------------------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Julien Plu<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Etudiant en 2<sup>ème</sup> année de Master Ingénierie en Intelligence Artificielle à l&#8217;Université Montpellier 2.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Mes projets Web sémantique&nbsp;: <a href="http://data.lirmm.fr">http://data.lirmm.fr</a><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Page personnelle&nbsp;: <a href="http://jplu.developpez.com">http://jplu.developpez.com</a><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Responsable de la <a href="http://web-semantique.developpez.com/">rubrique Web sémantique</a> de Developpez.com.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Fichier FOAF (version RDF)&nbsp;: <a href="http://jplu.developpez.com/julien">http://jplu.developpez.com/julien</a><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Fichier FOAF (version RDFa)&nbsp;: <a href="http://jplu.developpez.com/julien.html">http://jplu.developpez.com/julien.html</a><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Adresse mail personnelle&nbsp;: <a href="mailto:julien.plu@redaction-developpez.com">julien.plu@redaction-developpez.com</a><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'>Adresse mail universitaire&nbsp;: <a href="mailto:julien.plu@etud.univ-montp2.fr">julien.plu@etud.univ-montp2.fr</a><o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>