|
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 : main.cc : <cflags>"`Magick++-config
--cppflags`"
<linkflags>"`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:
Magick::Image::display()
... <snip> ...
g++ -s `Magick++-config --ldflags --libs` -o
"bin/darwin/release/mtest"
"bin/darwin/release/main.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
--libs`
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 main.cc if you'd find that useful.
Thanks,
Ian
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com --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 acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk