Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-29 02:27:00


Hi Ian,

> 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"

I suppose this is caused by the fact that some Magick++ libraries are static
on Darwin, or by a different linking model.

> 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.

The idea to hack darwin.jam is the right one, ineed. Adding <linkflags> to the
end gives better control, and it's needed for gcc jam. If you send a patch
which moves $(OPTIONS) to the end of linker's command line for both link and
link.dll rules on darwin.jam, this would be very appreciated.

- Volodya

 


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