Re: [boost] Boost.Tests: Unit test defines own main() function, why?

This code needed #define BOOST_TEST_DYN_LINK and now works perfectly. Well almost perfectly, before I realised something rather strange: the compiler ask for a .LIB as well. I am sure it exectues the DLL because when I erase it, the program crashes(.dll not found). So why is the compiler still asking for a .LIB file when I specifeid DLL linking? -- View this message in context: http://www.nabble.com/Boost.Tests%3A-Unit-test-defines-own-main%28%29-functi... Sent from the Boost - Dev mailing list archive at Nabble.com.

From: Vectra17
This code needed #define BOOST_TEST_DYN_LINK and now works perfectly. Well almost perfectly, before I realised something rather strange: the compiler ask for a .LIB as well. I am sure it exectues the DLL because when I erase it, the program crashes(.dll not found). So why is the compiler still asking for a .LIB file when I specifeid DLL linking?
Because, under windows, you /can't/ link against a DLL. The only thing the linker understands is a .LIB. If the code is in a DLL, you still need a LIB to tell the linker "this symbol can be found in a DLL called xxxx at run-time". -- Martin Bonner Senior Software Engineer/Team Leader PI SHURLOK LTD Telephone: +44 1223 441434 / 203894 (direct) Fax: +44 1223 203999 Email: martin.bonner@pi-shurlok.com www.pi-shurlok.com disclaimer
participants (2)
-
Martin Bonner
-
Vectra17