Boost on xcode(mac osx 10.6.3)

Hi guys, im trying to add boost in a C++ project on Mac OS X for a while,
but im stuck with reference errors.
Undefined symbols:
"boost::system::get_generic_category()", referenced from:
__static_initialization_and_destruction_0(int, int)in Main.o
__static_initialization_and_destruction_0(int, int)in Main.o
__static_initialization_and_destruction_0(int, int)in Main.o
"boost::system::get_system_category()", referenced from:
boost::asio::error::get_system_category() in Main.o
__static_initialization_and_destruction_0(int, int)in Main.o
__static_initialization_and_destruction_0(int, int)in Main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I builded librarys with bjam, i linked them in the LIBRARY_SEARCH_PATHS:
LIBRARY_SEARCH_PATHS =
/Users/*usr*/boost_1_43_0/bin.v2/libs/date_time/build/darwin-4.2.1/release/threading-multi
/Users/*usr*/boost_1_43_0/bin.v2/libs/filesystem/build/darwin-4.2.1/release/link-static/threading-multi
/Users/*usr*/boost_1_43_0/bin.v2/libs/system/build/darwin-4.2.1/release/link-static/threading-multi
/
users/*usr*/boost_1_43_0/stage/lib <

I looked on the web for answeres, but lots of info was not on mac, and they only suggested to do things without any form of instructions.
I got boost working on microsoft visual studio 2008 on windows 7, so i know it should work, but i am not sure if it is supposed to work on xcode.
If anyone has more experience with this, can you please help me? :)
Boost ASIO uses Boost.System, that's why the linker looks for these functions. Do you build for Mac or for iPhone? I used to build boost for Mac like this (static libs, shared CRT): bjam toolset=darwin threading=multi variant=release link=static runtime-link=shared architecture=combined link=static stage Note "stage" at the end of line - this's the folder where all the libs will be put, so you'll have to add this folder only to your lib search path.

On 5/19/10 2:05 PM, in article AANLkTikdPwhvls44odWgy_EqB-d-MpsMHORvRTdRAntl@mail.gmail.com, "Rob Biermann" wrote:
Hi guys, im trying to add boost in a C++ project on Mac OS X for a while, but im stuck with reference errors.
Undefined symbols: "boost::system::get_generic_category()", referenced from: __static_initialization_and_destruction_0(int, int)in Main.o __static_initialization_and_destruction_0(int, int)in Main.o __static_initialization_and_destruction_0(int, int)in Main.o "boost::system::get_system_category()", referenced from: boost::asio::error::get_system_category() in Main.o __static_initialization_and_destruction_0(int, int)in Main.o __static_initialization_and_destruction_0(int, int)in Main.o ld: symbol(s) not found collect2: ld returned 1 exit status
I builded librarys with bjam, i linked them in the LIBRARY_SEARCH_PATHS:
LIBRARY_SEARCH_PATHS = /Users/*usr*/boost_1_43_0/bin.v2/libs/date_time/build/darwin-4.2.1/release/thr eading-multi /Users/*usr*/boost_1_43_0/bin.v2/libs/filesystem/build/darwin-4.2.1/release/li nk-static/threading-multi /Users/*usr*/boost_1_43_0/bin.v2/libs/system/build/darwin-4.2.1/release/link-s tatic/threading-multi / users/*usr*/boost_1_43_0/stage/lib <
Also i made sure the include paths are correct: HEADER_SEARCH_PATHS = /users/*usr*/boost_1_43_0
I looked on the web for answeres, but lots of info was not on mac, and they only suggested to do things without any form of instructions.
I got boost working on microsoft visual studio 2008 on windows 7, so i know it should work, but i am not sure if it is supposed to work on xcode.
If anyone has more experience with this, can you please help me? :)
Thanks in advance.
EDIT: I'm trying to include asio.hpp in boost folder _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I usually _install_ boost into /Users/Shared/Toolkits but that probably does not matter here. You need to make sure the proper libraries are built and you are telling the linker where to look for the libraries. -- Mike Jackson
participants (3)
-
Igor R
-
Michael Jackson
-
Rob Biermann