[CMake] Boost Link errors with Cmake

Gabriel Sepúlveda gabriel.sepulveda at sixbell.cl
Wed Jun 18 15:19:10 EDT 2008



Hi,

maybe you aren't linking with the librery. For this, you must use the 
CMAKE command:

TARGET_LINK_LIBRARIES( exe library )

Ravi Kavalipati wrote:
> Hi,
> When I run cmake the output says "-- Found the following Boost libraries:"
> but im getting undefined references errors for various boost 
> libraries, I think the boost libraries are not properly linked in my 
> program.
> 
> .../src/libhpx.a(parcelport_queue.cpp.o)(.text+0x3c0): In function `__tcf_15':
> : undefined reference to 
> `boost::archive::detail::basic_serializer_map::~basic_serializer_map()'
> ____________________________________________________________________
> #CMakeLists.txt
> # We require at least CMake V2.6
> cmake_minimum_required(VERSION 2.6)
> 
> # The name of our project is "hpx".  CMakeLists files in this project can
> # refer to the root source directory of the project as ${hpx_SOURCE_DIR} and
> # to the root binary directory of the project as ${hpx_BINARY_DIR}.
> project (hpx)
> 
> # We need to use Boost
> find_package(Boost 1.35.0 REQUIRED)
> INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
> INCLUDE_DIRECTORIES(${Boost_LIBRARY_DIRS})
> LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
> __________________________________________________________________________
> Can anyone please help me analyze my mistake?
> 
> - Ravi Tej
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 

_____________________________
La informacion contenida en esta transmision es confidencial, y no puede ser usada por otras personas que su(s) destinatario(s). El uso no autorizado de la informacion contenida en esta transmision puede ser sancionado. Si ha recibido esta transmision por error, por favor destruyala y notifique al remitente telefonicamente, con cobro revertido o via e-mail.

The information contained in this transmission is privileged, and may not be used by any person other than its addressee(s). Unauthorized use of the information contained in this transmission may be punished  by law.  If received in error, please destroy and notify the sender by calling collect or by e-mail.
_____________________________

_____________________________
La informacion contenida en esta transmision es confidencial, y no puede ser usada por otras personas que su(s) destinatario(s). El uso no autorizado de la informacion contenida en esta transmision puede ser sancionado. Si ha recibido esta transmision por error, por favor destruyala y notifique al remitente telefonicamente, con cobro revertido o via e-mail.

The information contained in this transmission is privileged, and may not be used by any person other than its addressee(s). Unauthorized use of the information contained in this transmission may be punished  by law.  If received in error, please destroy and notify the sender by calling collect or by e-mail.
_____________________________


More information about the CMake mailing list