Re: simple boost::test, undefined reference to main
On Sep 2, 11:30 pm, "Francesco S. Carta" <entul...@gmail.com> wrote:
suresh <suresh.amritap...@gmail.com>, on 02/09/2010 15:15:13, wrote:
[...]
#define BOOST_TEST_DYN_LINK
and
#define BOOST_TEST_MODULE MyTest
it works with -lboost_unit_test_framework linking option.
It seems strange to me that you have to use those defines.
Just a guess, but it wouldn't surprise me that it is the
-lboost_unit_test_framework which results in main being defined.
(I'm not familiar with boost::test either, but in the unit test
frameworks that I've seen, "main" is provided by the framework,
and not by the client code. And without the
-lboost_unit_test_framework, at least under Unix, you don't get
all of the framework.)
[...]
Now, I have not heard about other simpler test libraries..can you
mention them?
Sure, here is one which seems pretty straightforward and small:
http://cppunit.sourceforge.net/doc/lastest/cppunit_cookbook.html
There might be others hanging around on the net, search for "c++ unit test"
Google has one, which from what I've heard, is very similar to
cppunit.
--
James Kanze