|
Boost Users : |
From: Ãkos Maróy (akos_at_[hidden])
Date: 2008-08-24 04:51:53
Hi,
I'm having troulbe using libboost_text_exec_monitor with Visual Studio
2008. Basically a very simple test application, that initializes a test
suite in an init_unit_test_suite() function fails to link on Visual
Studio, when trying to link against both
libboost_unit_test_framework-vc90-mt-gd-1_35.lib and
libboost_test_exec_monitor-vc90-mt-gd-1_35.lib . I'm egetting an error
of LNK2019 saying that int __cdecl test_main(int, char ** const) is an
unresolved external symbol. The error, strangely enough, is reported
from libboost_test_exec_monitor-vc90-mt-fd-1_35.lib(test_main.obj),
being a reference from the function test_main_caller::operator().
The same code compiles & links fine using gcc on Linux, linking to the
same libraries (of course without the -vc90-mt-fd-1_35 suffix). The code
is simply:
#include <boost/test/unit_test.hpp>
using namespace boost::unit_test;
void test() {
BOOST_CHECK(true);
}
test_suite *
init_unit_test_suite(int, char **) {
test_suite *ts = BOOST_TEST_SUITE("Test");
ts->add(BOOST_TEST_CASE(&test));
framework::master_test_suite().add(ts);
return 0;
}
Shall I add something to the above code? shouldn't the text_exec_monitor
library contain test_main?
Akos
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