Where is this symbol defined?
I was wondering where the symbol .test_main(int, char**) is defined if it comes up undefined. gcc.compile.c+ + ../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/debug/threading-multi/basic_datagram_socket.o gcc.link ../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/debug/threading-multi/basic_datagram_socket_select ld: 0711-224 WARNING: Duplicate symbol: .init_unit_test_suite(int, char**) ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .test_main(int, char**) collect2: error: ld returned 8 exit status I have done an object dump and I know it is undefined in libboost_test_exec_monitor.a, but that's as far as I got.
On Friday 11 July 2014 14:53:04 Axel Ismirlian wrote:
I was wondering where the symbol .test_main(int, char**) is defined if it comes up undefined.
gcc.compile.c+ + ../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/debug/ threading-multi/basic_datagram_socket.o gcc.link ../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/debug/ threading-multi/basic_datagram_socket_select ld: 0711-224 WARNING: Duplicate symbol: .init_unit_test_suite(int, char**) ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .test_main(int, char**) collect2: error: ld returned 8 exit status
I have done an object dump and I know it is undefined in libboost_test_exec_monitor.a, but that's as far as I got.
I think, test_main is supposed to be defined by the test. Optionally, Boost.Test could generate it if asked. I think you should define BOOST_TEST_MODULE for that. I don't know if Boost.ASIO tests are supposed to work that way.
I'm a little confused where is BOOST_TEST_MODULE located? And should I
define this in the cpp code of the test itself?
From: Andrey Semashev
I was wondering where the symbol .test_main(int, char**) is defined if it comes up undefined.
gcc.compile.c+ + ../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/debug/
threading-multi/basic_datagram_socket.o gcc.link ../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/debug/
threading-multi/basic_datagram_socket_select ld: 0711-224 WARNING: Duplicate symbol: .init_unit_test_suite(int, char**) ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .test_main(int, char**) collect2: error: ld returned 8 exit status
I have done an object dump and I know it is undefined in libboost_test_exec_monitor.a, but that's as far as I got.
I think, test_main is supposed to be defined by the test. Optionally, Boost.Test could generate it if asked. I think you should define BOOST_TEST_MODULE for that. I don't know if Boost.ASIO tests are supposed to work that way. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
On Friday 11 July 2014 15:45:52 Axel Ismirlian wrote:
From: Andrey Semashev
To: boost@lists.boost.org Date: 07/11/2014 03:38 PM Subject: Re: [boost] Where is this symbol defined? Sent by: "Boost" On Friday 11 July 2014 14:53:04 Axel Ismirlian wrote:
I was wondering where the symbol .test_main(int, char**) is defined if it comes up undefined.
gcc.compile.c+ + ../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/deb ug /
threading-multi/basic_datagram_socket.o gcc.link ../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/deb ug /
threading-multi/basic_datagram_socket_select ld: 0711-224 WARNING: Duplicate
symbol: .init_unit_test_suite(int, char**) ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .test_main(int, char**) collect2: error: ld returned 8 exit status
I have done an object dump and I know it is undefined in libboost_test_exec_monitor.a, but that's as far as I got.
I think, test_main is supposed to be defined by the test. Optionally, Boost.Test could generate it if asked. I think you should define BOOST_TEST_MODULE for that. I don't know if Boost.ASIO tests are supposed to work that way.
I'm a little confused where is BOOST_TEST_MODULE located? And should I define this in the cpp code of the test itself?
It's a macro that should be defined before Boost.Test headers are included. http://www.boost.org/doc/libs/1_55_0/libs/test/doc/html/utf/compilation.html
So wait are you suggesting that I add #define BOOST_TEST_MODULE asio before
#include
From: Andrey Semashev
To: boost@lists.boost.org Date: 07/11/2014 03:38 PM Subject: Re: [boost] Where is this symbol defined? Sent by: "Boost" On Friday 11 July 2014 14:53:04 Axel Ismirlian wrote:
I was wondering where the symbol .test_main(int, char**) is defined
if
it comes up undefined.
gcc.compile.c+ +
../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/deb
ug /
threading-multi/basic_datagram_socket.o gcc.link
../bin.v2/libs/asio/test/basic_datagram_socket_select.test/gcc-4.8.1/deb
ug /
threading-multi/basic_datagram_socket_select ld: 0711-224 WARNING: Duplicate
symbol: .init_unit_test_suite(int, char**) ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .test_main(int, char**) collect2: error: ld returned 8 exit status
I have done an object dump and I know it is undefined in libboost_test_exec_monitor.a, but that's as far as I got.
I think, test_main is supposed to be defined by the test. Optionally, Boost.Test could generate it if asked. I think you should define BOOST_TEST_MODULE for that. I don't know if Boost.ASIO tests are supposed to work that way.
I'm a little confused where is BOOST_TEST_MODULE located? And should I define this in the cpp code of the test itself?
It's a macro that should be defined before Boost.Test headers are included. http://www.boost.org/doc/libs/1_55_0/libs/test/doc/html/utf/compilation.html _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
On Friday 11 July 2014 16:49:58 Axel Ismirlian wrote:
I'm a little confused where is BOOST_TEST_MODULE located? And should I define this in the cpp code of the test itself?
It's a macro that should be defined before Boost.Test headers are included.
http://www.boost.org/doc/libs/1_55_0/libs/test/doc/html/utf/compilation.ht ml
So wait are you suggesting that I add #define BOOST_TEST_MODULE asio before #include
? How do you propose I fix this?
This is something you can try locally. I'm not suggesting a 'fix', I just answered your original question. I have no idea how ASIO tests work or why they don't work on your setup. The tests compile just fine in the test matrix. PS: Please, don't top post.
participants (2)
-
Andrey Semashev
-
Axel Ismirlian