> On Thu, 11 Nov 2010 07:07:48 -0500
> cmake-requ...@cmake.org wrote:
> 
> > Any help is greatly appreciated!
> 
> I'd help if I could. Unfortunately I'm still stuck on this. Usually I
> can work around a problem given enough time, but this is a real
> stumper. Actually I do have a suggestion (see below) but it's kind of
> ugly.

This always happens. Declare complete stumpitude and almost immediately
find a solution. This is the problem: I'm linking statically and
boost_thread wants to link dynamically.

The clue is in the first error in the build log: "undefined reference
to `_imp___blablabla'". The "_imp___" part gives it away. The fix is to
define BOOST_THREAD_USE_LIB in your CMakeLists.txt:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_THREAD_USE_LIB=1")

I haven't tested it, but it builds without complaint now.

HtH,
Adam J Richardson

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to