Boost Unit test on Eclipse

I have tried to use boost unit test on Eclipse CDT w/ MinGW and VC++. But I can not link to the static boost library: libboost_unit_test_framework-vc100-mt-1_47.lib. The code I used: #defineBOOST_TEST_MAIN #defineBOOST_TEST_MODULEMasterTestSuite #include<boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(FooTests) BOOST_AUTO_TEST_CASE(ctor_test1) { Fooa; BOOST_CHECK_EQUAL(a.name(),MY_PROJECT_NAMESPACE::Foo::DEF_NAME); } BOOST_AUTO_TEST_CASE(ctor_test2) { conststd::stringtheName("Blah"); Fooa(theName); BOOST_CHECK_EQUAL(a.name(),theName); } BOOST_AUTO_TEST_SUITE_END() What is wrong?

Hi! On Thu, Aug 11, 2011 at 6:35 PM, Yong Qin <YQIN_99@yahoo.com> wrote:
I have tried to use boost unit test on Eclipse CDT w/ MinGW and VC++. But I can not link to the static boost library: libboost_unit_test_framework-vc100-mt-1_47.lib.
The code I used:
[...]
What is wrong?
As the name of the library implies, which you are trying to link with, this lib was build for visual c++ and not MinGW. Try building boost with MinGW and link against it. Best Regards, Ovanes

for VC, I try to link to: libboost_test_exec_monitor-vc100-mt-1_47.lib and got error: LNK1561: entry point must be defined VCApp_Test line 0 C/C++ Problem for MinGW, I try to link to: libboost_test_exec_monitor-mgw46-mt-1_47.a and got error: undefined reference to `__chkstk_ms' MinGWApp_Test line 0, external location: D:\boost_1_47_0-MinGW\stage\static\lib\libboost_unit_test_framework-mgw46-mt-1_47.a(unit_test_parameters.o):unit_test_parameters.cpp C/C++ Problem undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)' MinGWApp_Test line 0, external location: D:\boost_1_47_0-MinGW\stage\static\lib\libboost_unit_test_framework-mgw46-mt-1_47.a(unit_test_suite.o):unit_test_suite.cpp C/C++ Problem undefined reference to `std::__detail::_List_node_base::_M_unhook()' MinGWApp_Test line 0, external location: D:\boost_1_47_0-MinGW\stage\static\lib\libboost_unit_test_framework-mgw46-mt-1_47.a(unit_test_suite.o):unit_test_suite.cpp C/C++ Problem -- View this message in context: http://boost.2283326.n4.nabble.com/Boost-Unit-test-on-Eclipse-tp3736376p3736... Sent from the Boost - Users mailing list archive at Nabble.com.

I try to link to the static boost test library. By the way, what you mean by "Test Execution Monitor"? -- View this message in context: http://boost.2283326.n4.nabble.com/Boost-Unit-test-on-Eclipse-tp3736376p3737... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (4)
-
Gennadiy Rozental
-
Ovanes Markarian
-
Yong Qin
-
young