[CMake] Boost Link errors with Cmake

Ravi Kavalipati rkaval1 at lsu.edu
Wed Jun 18 15:03:39 EDT 2008


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


More information about the CMake mailing list