|
Boost Users : |
Subject: Re: [Boost-users] [Test]: Problem with simple Boost.Test
From: Damien Kick (dkick_at_[hidden])
Date: 2013-06-20 11:41:35
Date: Mon, 17 Jun 2013 23:03:16 +0000 (UTC)
From: legalize+jeeves_at_[hidden]<mailto:legalize+jeeves_at_[hidden]> (Richard)
To: boost-users_at_[hidden]<mailto:boost-users_at_[hidden]>
Subject: Re: [Boost-users] [Test]: Problem with simple Boost.Test
Message-ID: <kpo4jk$2ih$2_at_[hidden]<mailto:kpo4jk$2ih$2_at_[hidden]>>
[Please do not mail me a copy of your followup]
boost-users_at_[hidden]<mailto:boost-users_at_[hidden]> spake the secret code
<7364AB234369D348AE1CEBC1A86132DBAD32EA_at_[hidden]<http://SVLITMX02.shoretel.com>> thusly:
$ ${CXX} -c --std=c++0x -g -I${TARGET}/include cma.cpp -o cma.o
$ ${CXX} --std=c++0x -g cma.o ${TARGET}/lib/libboost_test_exec_monitor.a \
${TARGET}/lib/libboost_unit_test_framework.dylib -o cma
Why are you linking against boost_test_exec_monitor?
I've never needed to do that. boost_unit_test_framework should be enough.
Interesting. Because I'm finding the following:
$ ${CXX} -c --std=c++0x -g -I${TARGET}/include cma.cpp -o cma.o
$ ${CXX} --std=c++0x -g cma.o ${TARGET}/lib/libboost_unit_test_framework.dylib -o cma
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
$
But that is also what I'm finding with the system GCC and the Fink install of Boost 1.46, and so that behavior isn't unique my attempt to build/use a Boost with GCC 4.8.0 using --std=c++0x.
$ g++ -c -g -I/sw/include cma.cpp -o cma.o
$ g++ -g -L/sw/lib cma.o -lboost_unit_test_framework-mt
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
$ g++ --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ fink list --tab boost1.46
Information about 7237 packages read in 1 seconds.
i boost1.46.1.cmake 1.46.1-2 Boost C++ Libraries
i boost1.46.1.cmake-shlibs 1.46.1-2 Boost C++ Libraries
$
________________________________
This e-mail and any attachments are confidential. If it is not intended for you, please notify the sender, and please erase and ignore the contents.
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