Subject: Re: [Boost-build] g++ 4.3.2 linking error - auto-import
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-04-22 13:00:28
I get the same problem when I build the serialization library with static
linking. I suspect that the trunk tests don't do this so the problem only
shows up when I do it myself. I would be happy to ignore the warning -
EXCEPT that the program crashes with some sort of standard exception ? code
5 ?. From the message, it seemed that I would have to add something like
decl or whatever to some of the declarations in the library, but I haven't
been able to figure out which ones. So I'm stuck
Juergen Hunold wrote:
> Hi Frédéric,
> On Tuesday 21 April 2009, Frédéric Bron wrote:
>> What does this error mean? http://tinyurl.com/dgrw8t
>> It does not appear with g++ 3.4.4, only with 4.3.2.
> This is a new feature of gcc-4.x, I think. It allows linking against
> dll without dllexport/dllimport attributes.
> The relevant part of the error message is:
>> win/bin/ld: warning: auto-importing has been activated without
>> --enable-auto-import specified on the command line.
>> This should work unless it involves constant data structures
>> referencing symbols from auto-imported DLLs.)
> This can be fixed by adding:
> to the compiler setup.
> I also add
> to prevent further warning from gcc-4.x
> For further information, take a look at the gcc documentation.
> I'm no cygwin/mingw expert, most options are shamelessly copied from
> Qt's win32-g++ mkspecs and work here (tm). :-))
> You might also hit
> when running Boost.Test based tests with gcc-4.x .
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