target_link_libraries is a cmake command. It works everywhere and is portable everywhere there's a cmake...<br><br><div>You should definitely rely on target_link_libraries rather than pragmas in header files to pull in necessary libraries for linking.</div>
<div><br></div><div><br><div class="gmail_quote">On Wed, Dec 10, 2008 at 5:39 AM, kafou nmento <span dir="ltr"><<a href="mailto:ngondorolf@yahoo.fr">ngondorolf@yahoo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><div>I want to add an information. I intend to switch on Mac OS so I have to use only portable tools.</div>
<div> </div>
<div>Thanks again<br></div>
<div><br>--- En date de : <b>Mar 9.12.08, kafou nmento <i><<a href="mailto:ngondorolf@yahoo.fr" target="_blank">ngondorolf@yahoo.fr</a>></i></b> a écrit :<br></div>
<blockquote style="padding-left:5px;margin-left:5px;border-left:rgb(16,16,255) 2px solid">De: kafou nmento <<a href="mailto:ngondorolf@yahoo.fr" target="_blank">ngondorolf@yahoo.fr</a>><br>Objet: [CMake] Linking boost failure<br>
À: <a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a><br>Date: Mardi 9 Décembre 2008, 18h09<br><br>
<div>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top"><div class="Ih2E3d">
<div>Hi all!</div>
<div>I'm compiling a Qt based libtorrent app with CMake using MinGW generator. For those not knowing libtorrent, it is a lib fully boost based. (boost version used 1.34.1).</div>
<div>100% of the build goes well. But at the linking it fails with errors like "undefined reference to boost::....". The most recurrent is boost::mutex related.</div>
<div>I'm on Windows XP.</div>
<div>The same app works fine with MSVC 2008. I used for both Visual and CMake the same libs and preprocessor definition.</div>
<div> </div>
<div>If some one can help me (^_^)</div>
<div> </div>
</div><div class="Ih2E3d"><div>Thanks to all in advance.</div></div></td></tr></tbody></table><br></div><div class="Ih2E3d"><pre>_______________________________________________
CMake mailing list
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a></pre></div></blockquote></td></tr></tbody></table><br>
<br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>