<div dir="ltr">Hi,<div><br></div><div>add this :</div><div><br></div><div>link_directories(${Boost_LIBRARY_DIRS})</div><div><br></div><div>after the include_directories command.</div><div><br></div><div>Cheers,</div><div>Mourad<br clear="all">

<div dir="ltr"><div><font color="#222222" face="arial, sans-serif"><i><br></i></font></div></div>
<br><br><div class="gmail_quote">On Mon, Apr 30, 2012 at 10:26 PM, Hui Wang <span dir="ltr">&lt;<a href="mailto:huiwang8921@gmail.com" target="_blank">huiwang8921@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span>Yes, I tried with find_package( Boost COMPONENTS thread ) and target_link_libraries( ShowEngine ${Boost_LIBRARIES}), and that works. Thank you so much!</span> <br><br><div class="gmail_quote">On Mon, Apr 30, 2012 at 3:27 PM, Alain Leblanc <span dir="ltr">&lt;<a href="mailto:aalebl@gmail.com" target="_blank">aalebl@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Don&#39;t have much experience with boost in combination with cmake, but don&#39;t you still need to add the boost libraries in a target_link_libraries() command? (Or whatever command is usedbto indicate the libraries to link with).</p>




<p>A<br>
</p>
<div class="gmail_quote"><div><div class="h5"><div><div>On Apr 30, 2012 2:49 PM, &quot;Hui Wang&quot; &lt;<a href="mailto:huiwang8921@gmail.com" target="_blank">huiwang8921@gmail.com</a>&gt; wrote:<br type="attribution">

</div></div>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div><div>
Hello,<div><br></div><div>I&#39;m using CMake generated Visual Studio solution, and I added boost with find_package(Boost), </div><div>before that I used commands: set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF)</div>




<div>after that I used commands: include_directories(${Boost_INCLUDE_DIR}) add_executable( MyProject src/main.cpp)</div><div><br></div><div>Because automatic linking is used on Visual Studio when including Boost, and it typically use static libraries, I try not to conflict with that. But I get the error:</div>




<div>LINK : fatal error LNK1104: cannot open file &#39;libboost_thread-vc100-mt-gd-1_47.lib&#39;</div><div><br></div><div>I installed pre-compiled binary Boost with the installer provided by BoostPro Computing, and I checked to find that I do have</div>




<div>libboost_thread-vc100-mt-gd-1_47.lib, libboost_thread-vc100-mt-s-1_47.lib libboost_thread-vc100-mt-sgd-1_47.lib libboost_thread-vc100-mt-1_47.lib in C:\Program Files\boost\boost_1_47\lib</div><div><br></div><div>I also output messages to find that Boost_FOUND=TRUE Boost_LIBRARY_DIRS=C:/Program Files/boost/boost_1_47/lib Boost_INCLUDE_DIRS=C:/Program Files/boost/boost_1_47</div>




<div><br></div><div>So I&#39;m confused why it has the link error. I tried with dynamically linking too, it can&#39;t find the .dll files at runtime either, but again they exist right there in the directory I installed boost. Could anyone help me understand where the problem is?</div>




<div><div><br></div><div>Thanks!</div>-- <br>Sophie Wang<div><a href="http://www.sophiehuiwang.com" target="_blank">www.sophiehuiwang.com</a></div><br>
</div>
<br></div></div></div></div><span><font color="#888888">--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></font></span></blockquote></div>
<br>_______________________________________________<br>
Boost-users mailing list<br>
<a href="mailto:Boost-users@lists.boost.org" target="_blank">Boost-users@lists.boost.org</a><br>
<a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div>

<span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Sophie Wang<div>
<a href="http://www.sophiehuiwang.com" target="_blank">www.sophiehuiwang.com</a></div><br>
</font></span><br>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<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></div>