Boost logo

Boost Testing :

Subject: [Boost-testing] Link boost library in Visual C++
From: Suzanne Wood (sbw518_at_[hidden])
Date: 2012-07-31 11:57:04


I'd first built boost by installing bjam, but was having trouble with
naming conventions. Tried compiling with different options and ended
up compiling boost again using the bootstrap and b2 tools in the
distribution.

These are the responses from visual studio 2010 (C++ express).

error when attaching C:\Program
Files\boost\boost_1_49_0\bin.v2\libs\test\build\msvc-10.0\debug\asynch-exceptions-on\threading-multi
(built using bjam)

1>------ Build started: Project: common, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file
'libboost_unit_test_framework-vc100-mt-gd-1_49.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

error with only c:\Program Files\boost\boost_1_49_0\stage\lib (built
using bootstrap & b2)

1>------ Build started: Project: common, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file
'boost_unit_test_framework-vc100-mt-gd-1_49.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

when both are in Linker->General->Additional Library Directories

1>------ Build started: Project: common, Configuration: Debug Win32 ------
1>boost_unit_test_framework-vc100-mt-gd-1_49.lib(boost_unit_test_framework-vc100-mt-gd-1_49.dll)
: error LNK2005: "class boost::unit_test::master_test_suite_t &
__cdecl
boost::unit_test::framework::master_test_suite(void)"
(?master_test_suite_at_framework@unit_test_at_boost@@YAAAVmaster_test_suite_t_at_23@XZ)
already defined in libboost_unit_test_framework-vc100-mt-gd-1_49.lib
(framework.obj)
. . . etc.

In Config->Linker->Command Line (for the b2 build)
. . . /LIBPATH:"C:\...\zlib\contrib\vstudio\vc10\x86\ZlibDllDebug"
/LIBPATH:"c:\Program Files\boost\boost_1_49_0\stage\lib"
"kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib"
"advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib"
"odbc32.lib" "odbccp32.lib"

How might I communicate to Visual C++ Express to be satisfied with one
build of the boost libraries or the other? Thank you for any idea to
proceed.


Boost-testing list run by mbergal at meta-comm.com