can't build an official example on eclipse

hello,
I have an issue while trying to run boost for the first time.
I downloaded boost on my mac snow leopard, with eclipse.
I compiled the sources(with bjam, without options), and I added the
"include" directory (ie boost_1_41_0/boost)and the "libs" one (ie
boost_1_41_0/libs) in eclipse.
the example I used is the one provided by the official tutorial :
******************************************************
#define BOOST_TEST_MODULE MyTest
#include

AMDG loveley wrote:
I have an issue while trying to run boost for the first time. I downloaded boost on my mac snow leopard, with eclipse. I compiled the sources(with bjam, without options), and I added the "include" directory (ie boost_1_41_0/boost)and the "libs" one (ie boost_1_41_0/libs) in eclipse. the example I used is the one provided by the official tutorial :
<snip>
and the error is: http://pastebin.com/m4c85af13 .
1. g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o 2. Undefined symbols: 3.
"boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring<char const>, unsigned long, boost::unit_test::basic_cstring<char const>)", referenced from:
You need to link to the test library (-lboost_unit_test_framework) In Christ, Steven Watanabe

Steven Watanabe a écrit :
AMDG
loveley wrote:
I have an issue while trying to run boost for the first time. I downloaded boost on my mac snow leopard, with eclipse. I compiled the sources(with bjam, without options), and I added the "include" directory (ie boost_1_41_0/boost)and the "libs" one (ie boost_1_41_0/libs) in eclipse. the example I used is the one provided by the official tutorial :
<snip>
and the error is: http://pastebin.com/m4c85af13 .
1. g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o 2. Undefined symbols: 3.
"boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring
const>, unsigned long, boost::unit_test::basic_cstring<char const>)", referenced from:
You need to link to the test library (-lboost_unit_test_framework)
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
hi, thank you. I wonder how I can link this test library; can you tell me how? This appears to be an option, but for what program? olivier. ___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com

AMDG loveley wrote:
Steven Watanabe a écrit :
loveley wrote:
<snip>
and the error is: http://pastebin.com/m4c85af13 .
1. g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o 2. Undefined symbols: 3.
"boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring
const>, unsigned long, boost::unit_test::basic_cstring<char const>)", referenced from:
You need to link to the test library (-lboost_unit_test_framework)
I wonder how I can link this test library; can you tell me how? This appears to be an option, but for what program?
-l is for g++. I don't know where to specify this for eclipse. Check its documentation. In Christ, Steven Watanabe

Steven Watanabe a écrit :
AMDG
loveley wrote:
Steven Watanabe a écrit :
loveley wrote:
<snip>
and the error is: http://pastebin.com/m4c85af13 .
1. g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o 2. Undefined symbols: 3.
"boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring
const>, unsigned long, boost::unit_test::basic_cstring<char const>)", referenced from:
You need to link to the test library (-lboost_unit_test_framework)
I wonder how I can link this test library; can you tell me how? This appears to be an option, but for what program?
-l is for g++. I don't know where to specify this for eclipse. Check its documentation.
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
well, I modified eclipse, in the project options, tab "C/C++ build/ discovery options/ compiler invocation arguments" , and I added the -lboost_unit_test_framework options ... but in vain : nothing changed. can anyone help me? olivier. ___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com

loveley a écrit :
Steven Watanabe a écrit :
AMDG
loveley wrote:
Steven Watanabe a écrit :
loveley wrote:
<snip>
and the error is: http://pastebin.com/m4c85af13 .
1. g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o 2. Undefined symbols: 3.
"boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring
const>, unsigned long, boost::unit_test::basic_cstring<char const>)", referenced from:
You need to link to the test library (-lboost_unit_test_framework)
I wonder how I can link this test library; can you tell me how? This appears to be an option, but for what program?
-l is for g++. I don't know where to specify this for eclipse. Check its documentation.
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
well, I modified eclipse, in the project options, tab "C/C++ build/ discovery options/ compiler invocation arguments" , and I added the -lboost_unit_test_framework options ... but in vain : nothing changed.
can anyone help me?
olivier.
here is the result of my try attempts : **** Build of configuration Debug for project test_boost_1 **** make all Building target: test_boost_1 Invoking: MacOS X C++ Linker g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o -lboost_unit_test_framework ld: library not found for -lboost_unit_test_framework collect2: ld returned 1 exit status make: *** [test_boost_1] Error 1 the parameter is well passed to g++ but there still is a problem. olivier. ___________________________________________________________________________ Avez-vous essayé le nouveau Yahoo! Mail ? Plus rapide, plus efficace... simplement révolutionnaire ! Découvrez-le. Lien :http://fr.mail.yahoo.com

loveley a écrit :
loveley a écrit :
Steven Watanabe a écrit :
AMDG
loveley wrote:
Steven Watanabe a écrit :
loveley wrote:
<snip>
and the error is: http://pastebin.com/m4c85af13 .
1. g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o 2. Undefined symbols: 3.
"boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring
const>, unsigned long, boost::unit_test::basic_cstring<char const>)", referenced from:
You need to link to the test library (-lboost_unit_test_framework)
I wonder how I can link this test library; can you tell me how? This appears to be an option, but for what program?
-l is for g++. I don't know where to specify this for eclipse. Check its documentation.
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
well, I modified eclipse, in the project options, tab "C/C++ build/ discovery options/ compiler invocation arguments" , and I added the -lboost_unit_test_framework options ... but in vain : nothing changed.
can anyone help me?
olivier.
here is the result of my try attempts :
**** Build of configuration Debug for project test_boost_1 ****
make all Building target: test_boost_1 Invoking: MacOS X C++ Linker g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o -lboost_unit_test_framework ld: library not found for -lboost_unit_test_framework collect2: ld returned 1 exit status make: *** [test_boost_1] Error 1
the parameter is well passed to g++ but there still is a problem.
olivier.
___________________________________________________________________________ Avez-vous essayé le nouveau Yahoo! Mail ? Plus rapide, plus efficace... simplement révolutionnaire ! Découvrez-le. Lien :http://fr.mail.yahoo.com
one more thing : I am not sure whether I successfully compiler the libraries (nor if it is necessary), with "./bjam". Where must it be placed? olivier ___________________________________________________________________________ Avez-vous essayé le nouveau Yahoo! Mail ? Plus rapide, plus efficace... simplement révolutionnaire ! Découvrez-le. Lien :http://fr.mail.yahoo.com

AMDG loveley wrote:
loveley a écrit :
here is the result of my try attempts :
**** Build of configuration Debug for project test_boost_1 ****
make all Building target: test_boost_1 Invoking: MacOS X C++ Linker g++ -L/Applications/boost_1_41_0/libs -o "test_boost_1" ./principal/principal.o -lboost_unit_test_framework ld: library not found for -lboost_unit_test_framework collect2: ld returned 1 exit status make: *** [test_boost_1] Error 1
the parameter is well passed to g++ but there still is a problem.
one more thing : I am not sure whether I successfully compiler the libraries (nor if it is necessary), with "./bjam". Where must it be placed?
Try -L/Applications/boost_1_41_0/stage/lib instead of -L/Applications/boost_1_41_0/libs. In Christ, Steven Watanabe

loveley wrote:
well, I modified eclipse, in the project options, tab "C/C++ build/ discovery options/ compiler invocation arguments" , and I added the -lboost_unit_test_framework options ... but in vain : nothing changed.
"Discovery options" affects how Eclipse CDT figures which include directories your project uses. CDT uses that information for code completion. It does *not* affect building.
can anyone help me?
Did you read CDT docs? See the attached. - Volodya

Vladimir Prus a écrit :
loveley wrote:
well, I modified eclipse, in the project options, tab "C/C++ build/ discovery options/ compiler invocation arguments" , and I added the -lboost_unit_test_framework options ... but in vain : nothing changed.
"Discovery options" affects how Eclipse CDT figures which include directories your project uses. CDT uses that information for code completion. It does *not* affect building.
can anyone help me?
Did you read CDT docs? See the attached.
- Volodya
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users I succeeded in adding boost to eclipse : I used the -l and -L functions and for -L I added the directory
/bin.V2/libs/test and some sub-directories to eclipse. I also changed the parameters INCLUDE and LD_LIBRARY_PATH but I think it doesn't change anything.
thank you all for your help! olivier. ___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com

I'm using Eclipse/CDT with GCC under Windows.
You DO NOT need to specify any command-line switches/options. I
suggest
you first remove them all. Once you've done that, go into Project
Properties->
C/C++ Build->Settings->GCC C++ Compiler->Directories and set your
include directory to whatever the ROOT of your boost folder is, so in
my case
this is D:\libs\boost_1_41_0. DO NOT add \boost onto the end of that
path.
I believe the precompiled libs (/lib) are optional, because I can
compile fine
without them. So don't worry about that for now, first get the
includes working.
"Most Boost libraries are header-only: they consist entirely of header
files
containing templates and inline functions, and require no separately-
compiled
library binaries or special treatment when linking."
(cf. http://www.boost.org/doc/libs/1_41_0/more/getting_started/windows.html)
When you've done the above , I suggest you make an extremely simple
test
class which only tries to include a single boost class and see if you
can get
that to include boost, and build correctly. Then take it from there.
On Dec 12, 11:58 pm, Vladimir Prus
loveley wrote:
I succeeded in adding boost to eclipse : I used the -l and -L functions and for -L I added the directory
/bin.V2/libs/test and some sub-directories to eclipse. This is wrong. You should add
/stage/lib - Volodya
_______________________________________________ Boost-users mailing list Boost-us...@lists.boost.orghttp://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (4)
-
loveley
-
Nick Wiggill
-
Steven Watanabe
-
Vladimir Prus