Boost logo

Boost Users :

From: Malloc (malloc_at_[hidden])
Date: 2004-12-26 14:17:52


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hey there...

I recently downloaded, built, and installed Boost 1.32.

I am attempting to use the Boost Unit Test Framework but am running
into difficulties figuring out which lib to link to.

I am compiling with MS VC++ 7.1. The headers appear to be discovered
as they should be, but the linker is failing
to find the correct lib. I have tried many of the libs which were
created by the build, but these all create more errors
(typically to do with redefinitions of std:: functions). At this
point I am only trying to compile the example code
supplied on the projects web site.

some of the libs I tried:

libboost_prg_exec_monitor-vc71-mt-1_32.lib
libboost_test_exec_monitor-vc71-mt-1_32.lib
libboost_unit_test_framework-vc71-mt-1_32.lib

some articles I found online advised turning on mutithreading in the
compiler properities, enabling run time type identification, and
setting exceptions to /EHa

I've done all of this but nothing is working, it really just looks
like a linker problem.

Thanks for any help
Dave

- -------------------------
linking errors:

Linking...

main.obj : error LNK2019: unresolved external symbol "bool __cdecl
boost::test_tools::tt_detail::test_and_continue_impl(bool,class
boost::basic_wrap_stringstream<char> &,class
boost::unit_test::basic_cstring<char const >,unsigned int,bool,enum
boost::unit_test::log_level)"
(?test_and_continue_impl_at_tt_detail_at_test_tools_at_boost@@YA_N_NAAV?$basic_
wrap_stringstream_at_D@3_at_V?$basic_cstring@$$CBD_at_unit_test_at_3@I0W4log_level
@63@@Z) referenced in function "void __cdecl
free_test_function(void)" (?free_test_function@@YAXXZ)

main.obj : error LNK2019: unresolved external symbol "public: void
__thiscall boost::unit_test::test_suite::add(class
boost::unit_test::test_case *,unsigned long,int)"
(?add_at_test_suite_at_unit_test_at_boost@@QAEXPAVtest_case_at_23@KH_at_Z)
referenced in function "class boost::unit_test::test_suite * __cdecl
init_unit_test_suite(int,char * * const)"
(?init_unit_test_suite@@YAPAVtest_suite_at_unit_test_at_boost@@HQAPAD_at_Z)

main.obj : error LNK2019: unresolved external symbol "public:
__thiscall boost::unit_test::test_suite::test_suite(class
boost::unit_test::basic_cstring<char const >)"
(??0test_suite_at_unit_test_at_boost@@QAE_at_V?$basic_cstring@$$CBD_at_12@@Z)
referenced in function "class boost::unit_test::test_suite * __cdecl
init_unit_test_suite(int,char * * const)"
(?init_unit_test_suite@@YAPAVtest_suite_at_unit_test_at_boost@@HQAPAD_at_Z)

main.obj : error LNK2019: unresolved external symbol "class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const & __cdecl
boost::unit_test::ut_detail::normalize_test_case_name(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > &)"
(?normalize_test_case_name_at_ut_detail_at_unit_test_at_boost@@YAABV?$basic_str
ing_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@AAV45@@Z)
referenced in function "class boost::unit_test::test_case * __cdecl
boost::unit_test::create_test_case(void (__cdecl*)(void),class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >)"
(?create_test_case_at_unit_test_at_boost@@YAPAVtest_case_at_12@P6AXXZV?$basic_s
tring_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@@Z)

main.obj : error LNK2001: unresolved external symbol "public: virtual
unsigned long __thiscall boost::unit_test::test_case::size(void)const
" (?size_at_test_case_at_unit_test_at_boost@@UBEKXZ)

main.obj : error LNK2019: unresolved external symbol "protected:
__thiscall boost::unit_test::test_case::test_case(class
boost::unit_test::basic_cstring<char const >,bool,unsigned
long,bool)"
(??0test_case_at_unit_test_at_boost@@IAE_at_V?$basic_cstring@$$CBD_at_12@_NK1_at_Z)
referenced in function "public: __thiscall
boost::unit_test::function_test_case::function_test_case(void
(__cdecl*)(void),class boost::unit_test::basic_cstring<char const >)"
(??0function_test_case_at_unit_test_at_boost@@QAE_at_P6AXXZV?$basic_cstring@$$C
BD_at_12@@Z)

libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol
__malloc_dbg referenced in function "void * __cdecl operator
new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)"
(??2_at_YAPAXIABU_DebugHeapTag_t_at_std@@PADH_at_Z)

libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external
symbol __malloc_dbg

libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol
__free_dbg referenced in function "void __cdecl operator delete(void
*,struct std::_DebugHeapTag_t const &,char *,int)"
(??3_at_YAXPAXABU_DebugHeapTag_t_at_std@@PADH_at_Z)

LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol
_main referenced in function _mainCRTStartup

Debug/unittests.exe : fatal error LNK1120: 9 unresolved externals

Build Time 0:00

Build log was saved at
"file://e:\C++Source\unittests\Debug\BuildLog.htm"

unittests - 11 error(s), 0 warning(s)

- ---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped

- ----------------------------------------------------------------------
- ----------

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBQc8OX06myMoV5dC/EQL6eACeI7zolVzltRg/K4qyEtKtezJCVnkAmgK6
xSo1f992Mg3vXkIyQ/2Nk1z+
=6lrH
-----END PGP SIGNATURE-----


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net