Boost logo

Boost-Build :

From: Dirk Griffioen (dirk.griffioen_at_[hidden])
Date: 2005-07-16 07:49:47


Hi,

Maybe this is helpful?

boost/test/unit_test.hpp has the following lines:

#if 0
#ifndef BOOST_TEST_NO_AUTO_LINK

#define BOOST_LIB_NAME unix_test_framework
#define BOOST_LIB_DIAGNOSTIC yes
#include <boost/config/auto_link.hpp>

#endif
#endif

(which has been there as long as I can remember - and causes problems
when you download boost and link to boost_unit_test_framework.lib with
vc71 for the first time :)

if I change that to:

#if 1
#if !defined(BOOST_ALL_NO_LIB)
#include <boost/config/auto_link.hpp>
#endif
#endif

the link errror disappears.

However, the next thing that happens is:

boost_prg_exec_monitor.lib(cpp_main.obj) : error LNK2019: unresolved
external symbol "int __cdecl cpp_main(int,char * * const)"
(?cpp_main@@YAHHQAPAD_at_Z) referenced in function "public: virtual int
__thiscall `anonymous namespace'::cpp_main_caller::function(void)"

which I find curious, since I never had to link against that library
where I used to link to 'boost_unit_test_framework.lib' only. (And
still, gcc is not complaining).

Why do I need a cpp_main when I turn of auto_link?

I would be very happy if this is easily explained - and thus fixed :)

Best wishes,

Dirk Griffioen

 --------------000205080107030502040608 Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Maybe this is helpful?<br>
<br>
boost/test/unit_test.hpp has the following lines:<br>
<br>
<font face="Courier New, Courier, monospace">#if 0<br>
#ifndef BOOST_TEST_NO_AUTO_LINK<br>
<br>
#define BOOST_LIB_NAME unix_test_framework<br>
#define BOOST_LIB_DIAGNOSTIC yes<br>
#include &lt;boost/config/auto_link.hpp&gt;<br>
<br>
#endif<br>
#endif</font><br>
<br>
(which has been there as long as I can remember - and causes problems
when you download boost and link to boost_unit_test_framework.lib with
vc71 for the first time :)<br>
<br>
if I change that to:<br>
<br>
<font face="Courier New, Courier, monospace">#if 1<br>
#if !defined(BOOST_ALL_NO_LIB)<br>
#include &lt;boost/config/auto_link.hpp&gt;<br>
#endif<br>
#endif<br>
</font><br>
the link errror disappears.<br>
<br>
However, the next thing that happens is:<br>
<br>
<font face="Courier New, Courier, monospace">boost_prg_exec_monitor.lib(cpp_main.obj)
: error LNK2019: unresolved external symbol "int __cdecl
cpp_main(int,char * * const)" (?cpp_main@@YAHHQAPAD_at_Z) referenced in
function "public: virtual int __thiscall `anonymous
namespace'::cpp_main_caller::function(void)" </font><br>
<br>
which I find curious, since I never had to link against that library
where I used to link to 'boost_unit_test_framework.lib' only. (And
still, gcc is not complaining).<br>
<br>
Why do I need a cpp_main when I turn of auto_link?<br>
<br>
I would be very happy if this is easily explained - and thus fixed :)<br>
<br>
Best wishes,<br>
<br>
Dirk Griffioen<br>
<br>
<br>
<br>
<br>
</body>
</html>
 --------------000205080107030502040608--


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk