Boost logo

Boost-Build :

From: Ian Fasel (ianfasel_at_[hidden])
Date: 2004-09-28 21:28:52

I'm having a portability problem, due to differences
in gcc on linux and darwin.

On darwin (i.e., macosxppc), the gcc linker complains
if you put the libflags before the list of object
files. This makes it hard to use a configure tool
that spits out the library flags needed to use a
certain library. In particular, here is my Jamfile:

exe mtest : : <cflags>"`Magick++-config
--ldflags --libs`"

This works perfectly on linux using gcc, but doesn't
work on darwin. On darwin, the compilation of the
object file works, but I get these linker errors:
ld: Undefined symbols:
... <snip> ...
g++ -s `Magick++-config --ldflags --libs` -o

However, if I manually change the order of arguments
around and type them on the command line like so:

g++ -s -o "bin/darwin/release/mtest"
"bin/darwin/release/main.o" `Magick++-config --ldflags

it works fine.

I previously worked around this by hacking my copy of
darwin.jam, but I also don't have the expertise to do
this really right either, plus I'd rather not have to
distribute my custom darwin.jam file with my package.
Maybe someone can give me a better idea. I've attached
my Jamfile and my if you'd find that useful.


Do you Yahoo!?
Declare Yourself - Register online to vote today! --0-725528997-1096424932=:8533 Content-Type: application/x-gzip; name="MagickTest.tgz"
Content-Transfer-Encoding: base64
Content-Description: MagickTest.tgz
Content-Disposition: attachment; filename="MagickTest.tgz"

[Attachment content not displayed.] --0-725528997-1096424932=:8533--

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at