Boost logo

Boost Users :

Subject: Re: [Boost-users] [Test] failure linking tests dynamically
From: Richard (legalize+jeeves_at_[hidden])
Date: 2014-11-07 11:14:41


[Please do not mail me a copy of your followup]

Latimerius <pvl_at_[hidden]> spake the secret code
<20141107175110.GA3432_at_[hidden]> thusly:

>[...] However, all attempts so far failed due to
>
>Undefined symbols for architecture x86_64:
> "_main", referenced from:
> implicit entry/start for main executable
>ld: symbol(s) not found for architecture x86_64

When you compiled your test program, did you define BOOST_TEST_MAIN in
one of your source files before including the boost.test headers?

Someone needs to supply a definition of main and if you ask boost.test
to do it by defining that symbol before including the headers, it will
provide one for you.

Try looking at my documentation here and see if this clears things up:
<http://user.xmission.com/~legalize/boost.test/libs/test/doc/html/test/guide/compilation/shared_library.html>

>I'm on OS X Yosemite. I compile Boost with [...]
>
>Could someone please help me find the problem?

I don't have any Mac machines, but my understanding is that the
instructions I gave on the above page should work regardless of what
platform you are using via the use of bjam build logic.

-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net