|
Boost-Build : |
Subject: Re: [Boost-build] Linker error during arm-gcc cross compile
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-09-30 12:40:12
On Wednesday 30 September 2009 Christian Auby wrote:
> I have figured out why it happens:
>
> when using toolset=gcc-arm it still tries to link with winsock (ws2_32),
> which the arm-gcc linker can't find. There is no error message displayed
> from ld. Shouldn't boost.build display this? Or maybe all ld is giving
> is the cryptic one.
Christian,
I don't think boost.build intentionally hides any error messages.
Is an error message produced if you run the link command manually?
> Anyway: I haven't found a way to only link a library if I'm on a
> particular OS. The current rule is as follows:
>
> lib winsock
> :
> : <name>ws2_32
> ;
>
> lib myLib
> : glob [ source/*.cpp ]
> winsock
> : <link>static
> ;
>
> Is there some way for myLib to only link with winsock if target-os is
> "windows"?
The following should work:
lib myLib
: glob [ source/*.cpp ]
: <link>static <target-os>windows:<library>winsock
;
Does this help?
- 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