linker problems with boost::test examples

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

linker problems with boost::test examples

Markus Werle
Hi!

I have some problems getting started with boost::test.

I tried to build a Vc7 project using the code of
http://boost.org/libs/test/test/result_report_test.cpp, but this
fails to compile due to unresolved symbol init_unit_test_suite.

libboost_unit_test_framework-vc71-mt-sgd-1_33_1.lib(framework.obj) : error
LNK2019: Nicht aufgelöstes externes Symbol '"class boost::unit_test::test_suite
* __cdecl init_unit_test_suite(int,char * * const)"
(?init_unit_test_suite@@YAPAVtest_suite@unit_test@boost@@HQAPAD@Z)', verwiesen
in Funktion '"void __cdecl boost::unit_test::framework::init(int,char * *
const)" (?init@framework@unit_test@boost@@YAXHQAPAD@Z)'
Debug/test.exe : fatal error LNK1120: 1 unaufgelöste externe Verweise

Am I missing anything?

I found out that
#include <boost/test/included/test_exec_monitor.hpp>
resolves the problem, but is this the correct solution?


best regards,

Markus




_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: linker problems with boost::test examples

Gennadiy Rozental

"Markus Werle" <[hidden email]> wrote in message
news:[hidden email]...
> Hi!
>
> I have some problems getting started with boost::test.
>
> I tried to build a Vc7 project using the code of
> http://boost.org/libs/test/test/result_report_test.cpp, but this
> fails to compile due to unresolved symbol init_unit_test_suite.

You need to link with the Test Execution Monitor not the Unit Test Framework
component


> libboost_unit_test_framework-vc71-mt-sgd-1_33_1.lib(framework.obj) : error
> LNK2019: Nicht aufgelostes externes Symbol '"class
> boost::unit_test::test_suite
> * __cdecl init_unit_test_suite(int,char * * const)"
> (?init_unit_test_suite@@YAPAVtest_suite@unit_test@boost@@HQAPAD@Z)',
> verwiesen
> in Funktion '"void __cdecl boost::unit_test::framework::init(int,char * *
> const)" (?init@framework@unit_test@boost@@YAXHQAPAD@Z)'
> Debug/test.exe : fatal error LNK1120: 1 unaufgeloste externe Verweise
>
> Am I missing anything?
>
> I found out that
> #include <boost/test/included/test_exec_monitor.hpp>
> resolves the problem, but is this the correct solution?

This is one alternative that put included version of the Test Execution
Monitor directly into your test module. No linking is necessary in this
case.

Gennadiy



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users