Boost Users :
Subject: Re: [Boost-users] questions about visibility/dlls under mingw
From: John Maddock (jz.maddock_at_[hidden])
Date: 2018-11-19 19:07:22
> OK - due to some sleuthing on the part of one of the auxiliary
> maintainers of the boost serialization library, it's seems that the
> problem is that
> BOOST_SYMBOL_IMPORT is not defined to be
> __attribute__((__dllimport__)) under MINGW and that is the source of
> the problem.
That's not true, gcc.hpp has:
#Â Â Â define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
#Â Â Â define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
when _Win32 is defined.
And if I modify config_info.cpp to print these out then I see:
Â Â Â BOOST_SYMBOL_EXPORT =__attribute__((__dllexport__))
Â Â Â BOOST_SYMBOL_IMPORT =__attribute__((__dllimport__))
Â Â Â BOOST_SYMBOL_VISIBLE =__attribute__((__visibility__("default")))
Which looks good to me.
> It's totally plausible since gcc visibility attributes are only
> applied to exports and it seems that in moving to windows this rule is
> carried over.Â So I'm thinking that BOOST_SYMBOL_EXPORT needs to be
> updated for a special case of MINGW.
> Of course, this is subject to confirmation. Hope this is helpful.
> It's also been mentioned that the rules for application of these
> attributes might be different for functions and variables.Â The
> thought of this makes me ill.Â I don't know if it's true, but it's one
> more thing to keep things interesting.
> Robert Ramey
>> This email has been checked for viruses by Avast antivirus software.
>> Boost-users mailing list
> Boost-users mailing list
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net