
I've been seeing a problem in building MinGW version of he serializationalization library. This is related to auto-link. Now I notice that in config/compiler/gcc.hpp we've got: #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_HAS_DECLTYPE ... # define BOOST_NO_DECLTYPE Also in another part of the same file I find: #if __GNUC__ >= 4 # if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) // All Win32 development environments, including 64-bit Windows and MinGW, define // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, // so does not define _WIN32 or its variants. # define BOOST_HAS_DECLSPEC In my code I use BOOST_HAS_DECLSPEC but I'm having problems with mingw. I'm not sure it has anything to do with this, but it's not at clear to me what the differing meanings are of BOOST_HAS_DECLTYPE and BOOST_HAS_DECLSPEC. Robert Ramey

Quoting Robert Ramey <ramey@rrsd.com>:
In my code I use BOOST_HAS_DECLSPEC but I'm having problems with mingw. I'm not sure it has anything to do with this, but it's not at clear to me what the differing meanings are of BOOST_HAS_DECLTYPE and BOOST_HAS_DECLSPEC.
Robert Ramey
BOOST_HAS_DECLTYPE is to do with the C++0x decltype feature (http://en.wikipedia.org/wiki/Decltype) BOOST_HAS_DECLSPEC is to do with symbol exporting and is likely to be the only relevant thing to your issue.

BOOST_HAS_DECLTYPE is to do with the C++0x decltype feature (http://en.wikipedia.org/wiki/Decltype)
BOOST_HAS_DECLSPEC is to do with symbol exporting and is likely to be the only relevant thing to your issue.
Yup. Nothing to do with auto-linking either since gcc doesn't support that, it's purely a symbol visibility issue, and gcc is quite a bit stricter about what works than msvc. One thing you could try is building the library and tests on Linux with -fvisiblity-hidden - you will very likely get lots of unresolved externals - then it's a case of adding the symbol visibility macros to those and/or preprocessing the offending source to see why things aren't working as expected. HTH, John.
participants (3)
-
John Maddock
-
Peter Bartlett
-
Robert Ramey