<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>I tried your lines in my CMakelists. I use the 1.34.1 version of boost. The components I set are : thread, filesystem, date_time, pogram_options, regex</DIV>
<DIV>But I got these errors while configuring</DIV>
<DIV><SPAN style="COLOR: #ff0000">CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:620 (message):</SPAN></DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">Unable to find the requested Boost libraries.</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0; qt-paragraph-type: empty"></DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">Boost version: 1.34.1</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0; qt-paragraph-type: empty"></DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">Boost include path: C:/Program Files/boost/boost_1_34_1</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0; qt-paragraph-type: empty"></DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">The following Boost libraries could not be found:</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0; qt-paragraph-type: empty"></DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">boost_thread</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">boost_filesystem</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">boost_date_time</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">boost_program_options</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">boost_regex</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0; qt-paragraph-type: empty"></DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">directory containing Boost libraries or BOOST_ROOT to the location of</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">Boost.</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">Call Stack (most recent call first):</DIV>
<P style="MARGIN: 0px; COLOR: #ff0000; TEXT-INDENT: 0px; qt-block-indent: 0">CMakeLists.txt:65 (FIND_PACKAGE)</DIV>
<DIV> </DIV>
<DIV>So I guess my boost library is not porperly installed. But why it works with MSVC?</DIV>
<DIV>What can I do? I already re-installed boost.</DIV>
<DIV>A bit question, does it matter if I use latest version of boost if my app was built using older version of boost?</DIV>
<DIV> </DIV>
<DIV>Thanks in advance for help (^_^)<BR><BR>--- En date de : <B>Mer 10.12.08, Michael Jackson <I><mike.jackson@bluequartz.net></I></B> a écrit :<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">De: Michael Jackson <mike.jackson@bluequartz.net><BR>Objet: Re: [CMake] Fw : Linking boost failure<BR>À: "Cmake Mailing List" <cmake@cmake.org><BR>Date: Mercredi 10 Décembre 2008, 17h42<BR><BR><PRE>Are you using the FindBoost() command in your CMakeLists.txt file? If not you
really should be as this will solve all your problems. An example from one of my
own projects is:
SET (Boost_FIND_REQUIRED TRUE)
SET (Boost_FIND_QUIETLY FALSE)
FIND_PACKAGE(Boost 1.36 COMPONENTS program_options system filesystem)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) # Include the Boost Headers
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
.....
ADD_EXECUTABLE(PVPluginGenerator ${SOURCES} ${HEADERS})
TARGET_LINK_LIBRARIES(PVPluginGenerator ${Boost_LIBRARIES})
Boost_LIBRARIES will contain all the selected boost libraries for each platform
you compile on.
_________________________________________________________
Mike Jackson mike.jackson@bluequartz.net
BlueQuartz Software www.bluequartz.net
Principal Software Engineer Dayton, Ohio
On Dec 10, 2008, at 11:36 AM, kafou nmento wrote:
> Sorry, I didn't finish the message.
> So, here are the libs which make the app work with MSVC:
> libboost_thread-vc-mt.lib
> libboost_filesystem-vc-mt.lib
> libboost_date_tim-vc-mt.lib
> libboost_program_options-vc-mt.lib
> libboost_regex-vc-mt.lib
>
> And from building libs with MinGW I got:
> libboost_thread-mt.a
> libboost_filesystem-mt.a
> libboost_date_tim-mt.a
> libboost_program_options-mt.a
> libboost_regex-mt.a
>
> I put it as argument of TARGET_LIKN_LIBRARIES() , but the link still
fails.
>
> --- En date de : Mer 10.12.08, David Cole <david.cole@kitware.com> a
écrit :
> De: David Cole <david.cole@kitware.com>
> Objet: Re: [CMake] Fw : Linking boost failure
> À: ngondorolf@yahoo.fr
> Cc: cmake@cmake.org
> Date: Mercredi 10 Décembre 2008, 15h29
>
> target_link_libraries is a cmake command. It works everywhere and is
portable everywhere there's a cmake...
>
> You should definitely rely on target_link_libraries rather than pragmas in
header files to pull in necessary libraries for linking.
>
>
> On Wed, Dec 10, 2008 at 5:39 AM, kafou nmento <ngondorolf@yahoo.fr>
wrote:
> I want to add an information. I intend to switch on Mac OS so I have to
use only portable tools.
>
> Thanks again
>
> --- En date de : Mar 9.12.08, kafou nmento <ngondorolf@yahoo.fr> a
écrit :
> De: kafou nmento <ngondorolf@yahoo.fr>
> Objet: [CMake] Linking boost failure
> À: cmake@cmake.org
> Date: Mardi 9 Décembre 2008, 18h09
>
> Hi all!
> 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).
> 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.
> I'm on Windows XP.
> The same app works fine with MSVC 2008. I used for both Visual and CMake
the same libs and preprocessor definition.
>
> If some one can help me (^_^)
>
> Thanks to all in advance.
>
> _______________________________________________
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>
> _______________________________________________
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>
> _______________________________________________
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
</PRE></BLOCKQUOTE></td></tr></table><br>