From: Christian H. <chh...@gm...> - 2007-06-11 14:57:01
|
Hi, I'm having a problem with the two test files. I cannot have them both in my project the linker will complain then. message_test.obj : error LNK2005: "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) already defined in message_transform_test.obj Christian |
From: Dean M. B. <mik...@gm...> - 2007-06-11 16:06:41
|
On 6/11/07, Christian Henning <chh...@gm...> wrote: > Hi, > > I'm having a problem with the two test files. I cannot have them both > in my project the linker will complain then. > > message_test.obj : error LNK2005: "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) > already defined in message_transform_test.obj > What version of Boost are you using? I'm currently developing the C++ Networking library against Boost CVS HEAD. Are you using Boost.Build to build the unit tests as well? -- Dean Michael C. Berris http://cplusplus-soup.blogspot.com/ mikhailberis AT gmail DOT com +63 928 7291459 |
From: Christian H. <chh...@gm...> - 2007-06-11 16:12:44
|
nope, I'm using Visual Studio 7.1 SP1 with boost 1.34. Guess that's the reason why it fails. On 6/11/07, Dean Michael Berris <mik...@gm...> wrote: > On 6/11/07, Christian Henning <chh...@gm...> wrote: > > Hi, > > > > I'm having a problem with the two test files. I cannot have them both > > in my project the linker will complain then. > > > > message_test.obj : error LNK2005: "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) > > already defined in message_transform_test.obj > > > > What version of Boost are you using? > > I'm currently developing the C++ Networking library against Boost CVS HEAD. > > Are you using Boost.Build to build the unit tests as well? > > -- > Dean Michael C. Berris > http://cplusplus-soup.blogspot.com/ > mikhailberis AT gmail DOT com > +63 928 7291459 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > |
From: Dean M. B. <mik...@gm...> - 2007-06-11 16:16:46
|
On 6/11/07, Christian Henning <chh...@gm...> wrote: > nope, I'm using Visual Studio 7.1 SP1 with boost 1.34. Guess that's > the reason why it fails. > How do you build the unit tests? You don't use Boost.Build v2? If you have configured Boost 1.34 correctly and installed Boost.Jam to your PATH, you should be able to go to libs/network/test and do 'bjam'. This also requires that you have the BOOST_ROOT environment variable set to where the Boost distribution root is. HTH -- Dean Michael C. Berris http://cplusplus-soup.blogspot.com/ mikhailberis AT gmail DOT com +63 928 7291459 |
From: Cheng L. <rhy...@gm...> - 2007-06-12 02:12:39
|
Hi, Christian I'm afraid msvc 7.1 and boost 1.34 are both innocent :-) The problem is this line in both message_test.cpp and message_transform_test.cpp: #define BOOST_TEST_MODULE message test Once you define the BOOST_TEST_MODULE in one compile unit, Boost.Test actually puts a main() in it. Since there are two BOOST_TEST_MODULE defined, two main() are defined. In Dean's Jamfile.v2, message_test.cpp and message_transform_test.cpp are compiled separately into two executables. If you'd like to build the tests with msvc 7.1, I'm afraid you should put these two unit tests into two separate project. Cheers Cheng Christian Henning wrote: > nope, I'm using Visual Studio 7.1 SP1 with boost 1.34. Guess that's > the reason why it fails. > > > On 6/11/07, Dean Michael Berris <mik...@gm...> wrote: > >> On 6/11/07, Christian Henning <chh...@gm...> wrote: >> >>> Hi, >>> >>> I'm having a problem with the two test files. I cannot have them both >>> in my project the linker will complain then. >>> >>> message_test.obj : error LNK2005: "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) >>> already defined in message_transform_test.obj >>> >>> >> What version of Boost are you using? >> >> I'm currently developing the C++ Networking library against Boost CVS HEAD. >> >> Are you using Boost.Build to build the unit tests as well? >> >> -- >> Dean Michael C. Berris >> http://cplusplus-soup.blogspot.com/ >> mikhailberis AT gmail DOT com >> +63 928 7291459 >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Cpp-netlib-devel mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > > |