[CMake] Fw : Linking boost failure

kafou nmento ngondorolf at yahoo.fr
Wed Dec 10 11:36:01 EST 2008


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 at kitware.com> a écrit :

De: David Cole <david.cole at kitware.com>
Objet: Re: [CMake] Fw : Linking boost failure
À: ngondorolf at yahoo.fr
Cc: cmake at 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 at 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 at yahoo.fr> a écrit :

De: kafou nmento <ngondorolf at yahoo.fr>
Objet: [CMake] Linking boost failure
À: cmake at 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 at cmake.org
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081210/39565c57/attachment-0001.htm>


More information about the CMake mailing list