/usr/lib/gcc/i586-suse-linux/4.1.0/../../../crt1.o: In function `_start': init.c:(.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status
Addidtional information: This is gcc-4.1.0 on linux. The boost libs were built with the boost build system. I am setting up test_suits as follows:
test_suite* init_unit_test_suite( int, char* [] ) { test_suite* test(BOOST_TEST_SUITE("Unit test macros"));
// <snip>
return test; }
Any idea what's going wrong?
I am not sure how did it work before,
It worked before because V2 was building DLL without setting BOOST_TEST_DYN_LINK, so Boost.Test was defining the main function, and it worked.
Okay, I see.
but above code couldn't be used with DLL design that comes with 1.34. My guess is you somehow were using old dynamic library that only worked on non-NT platforms, but included main. With latest Volodia's changes you are now forced to comply to the proper interfaces in latest design.
I was following the instructions in the RC_1_34_0 documentation of the library (see boost_RC_1_34_0/libs/test/doc/components/utf/compilation.html#static_build). I thought compiling with BOOST_TEST_DYN_LINK defined, as stated there, should suffice to allow linking with the dynamic library. Seems like I missed something in the docs? Okay, I looked at the utf-tests and from what I observed there, it seems that (at least with gcc on linux) one has to use the static library version now if "init_unit_test_suite" is used to set up tests. Is that correct? Thanks, Chris