|
Boost Users : |
Subject: [Boost-users] [Test] failure linking tests dynamically
From: Latimerius (pvl_at_[hidden])
Date: 2014-11-07 12:51:10
Hello,
I'm evaluating Boost.Test. I did the initial evaluation using the
header-only variant and now I'd like to move to dynamic linking the Test
library for a larger-scale deployment. 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
I'd put it down to my lack of experience with Test, or Boost in general,
however I noticed that my libs/test/example's don't seem to build
either.
I'm on OS X Yosemite. I compile Boost with
./bootstrap.sh --prefix=<my_dir>
./b2 cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++"
./b2 install
As this doesn't seem to compile the necessary .dylibs I added
<define>BOOST_TEST_DYN_LINK=1 <link>shared
to the "requirements" section of the first target in
libs/test/build/Jamfile.v2 and rebuilt just Boost.Test. Although I
don't actually know what I was doing, this did seem to build the
Boost.Test dynamic libraries, which tests are however failing to link
against.
The result looks the same on 1_56_0 and 1_57_0.
Could someone please help me find the problem? I'm dubious about my
building procedure in particular, could someone give me a complete
sequence of steps necessary to build Boost with Boost.Test ready to be
linked dynamically? I check the documentation, which is good and
detailed but deals with various aspects in isolation and doesn't give a
newcomer a good idea of the overall process.
Cheers!
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