Boost logo

Boost Interest :

Subject: [Boost-cmake] boost cmake and visual studio
From: Nehme Bilal (nbilal_at_[hidden])
Date: 2010-03-19 19:32:19


Hello,

I am trying to use boost-cmake with visual studio. My
project looks like:

I created a test project that looks like:

Boost_cmake_test/
                 /boost
                       /src
                       /build
                 /CMakeLists.txt
                 /main.cpp

My CMakeList:
############################################################
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)

include_directories(${CMAKE_SOURCE_DIR}/boost/src)

include( ${CMAKE_SOURCE_DIR}/boost/build/lib/Exports.cmake
)

add_executable(my_program main.cpp)

target_link_libraries(my_program
boost_date_time-mt-shared)
############################################################

main.cpp :
//---------------------------------
#include <iostream>
#include "boost/date_time/posix_time/time_parsers.hpp"

int main()
{
return 1;
}
//---------------------------------

This works perfectly on linux but when I try to compile it
in visual studio, I get this error:
1>LINK : fatal error LNK1104: cannot open file
'libboost_date_time-vc90-mt-gd-1_41.lib'

It looks like that visual studio is trying to find
'libboost_date_time-vc90-mt-gd-1_41.lib' which doesn't
exist instead of 'libboost_date_time-vc-mt-gd-1_41.lib'.

Any body knows what's happening ?

Thank you.
Nehme Bilal


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk