Re: OT: Boost libraries - fixed
Re: OT: Boost libraries - fixed
- Subject: Re: OT: Boost libraries - fixed
- From: Barrie Green <email@hidden>
- Date: Fri, 2 Jan 2004 18:20:24 +0000
A few people have asked me come back when I fixed the problems and
tell them what i did so this is how i got boost to work:
My problem basically boiled down to me being a complete donkey. I
didn't know that I had to add each library that i was going to use into
the "External Frameworks Folder" - pretty basic stuff really.
Anyway here are the basic steps I used to get boost to work for me:
You need to download boost - find the links from www.boost.org - you
also need to download a package called boost-build, this is located a
bit further down the download page of boost.
Expand both packages somewhere, bring up a terminal and cd to the
boost-build dir, mine was called boost-jam-3.1.7. type ./build.sh
darwin, which will kick off a short compile, if everything is OK you
should see a message saying updated 4 targtets. Copy the four files in
the bin.macosxppc directory to the directory that you expanded the main
boost package into.
Now you can build boost. Change into the boost directory, then type
./bjam "-sTOOLS=darwin" return and the build will begin. it took about
five minutes on my machine (its a good test of the fans! if you have a
aluminium pb don't touch it for a bit!). if all has gone well you
should see a status message, mine said "updated 299 targets - failed
updating 6 targets" - the failures looked to be some problem with dyna
libraries, but i'm not particularly bothered.
The hard for me was the configuration of xcode, but this was mainly
because I'm new to unix development and don't know my way around a
"typical" unixy environment.
most of boost is implemented via header files so for the majority of
time you can get away with including in the header search path the
path to the boost directory which by default is located in the
directory which boost was built in. apparently you can also link this
directory symbolically to your /usr/include directory and get automatic
lookup, but i've not tried this.
If you use a part of boost that requires a library to be linked in,
you'll find this out by doing a build and getting a message about
Undefined Symbols - NOTE if you've got zero linking on you won't get
this message until you try and run the program, which i believe is the
default in the development build.
For instance: if you include <boost/regex.hpp> for the regular
expression stuff, you will need to add the libboost_regex.a lib into
your project. I did it this way, I created a libs directory and created
both a debug and a release subdirectory, I then went and found the
libboost_regex.a file (mine was in the base boost
dir/libs/regex/build/bin/libboost_regex.a/darwin/debug the release is
also there) and copied it over into its related directory - release in
release/debug in debug. Each build style can be told about these
additional libs via the Library Search Paths location in the project
info, for the development branch you want the debug location and for
the deployment branch you require the release location. Once you've
done this you need to add the actual library to the project, this is
easily achieved by selecting the libboost_regex.a file in finder and
dragging it into the left hand External Frameworks, i chose absolute
path in the dialog that pops up.
Thats what I did to get it to build, I dare there's something wrong in
there somewhere but there you go.
Thanks to all those that helped.
bg
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.