[Boost-bugs] [Boost C++ Libraries] #5371: The portable binary example fails to compile when the BOOST_ALL_DYN_LINK macro is defined.

Subject: [Boost-bugs] [Boost C++ Libraries] #5371: The portable binary example fails to compile when the BOOST_ALL_DYN_LINK macro is defined.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-25 14:01:46


#5371: The portable binary example fails to compile when the BOOST_ALL_DYN_LINK
macro is defined.
---------------------------------------+------------------------------------
 Reporter: benedikt.huber@… | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: |
---------------------------------------+------------------------------------
 Dears,

 The portable binary example demo_portable_archive.cpp fails to compile
 when the BOOST_ALL_DYN_LINK macro is defined.
 With boolst 1.45 under windows 7 in Visual Studio 2008 the compiler stops
 with error C2491 (definition of dllimport function not allowed).

 Compilation works when I globally define BOOST_ARCHIVE_SOURCE. However I
 suppose this private macro is not
 intended to be globally defined in the command line. Furthermore this
 breaks Visual Studio's
 autolink feature so that I have to explicitly add boost_serialization-
 vc90-mt.lib to the linker dependencies.

 The problem seems to be connected to BOOST_ARCHIVE_OR_WARCHIVE_DECL.
 How can this issue be fixed so that we can write custom binary archives
 and use BOOST_ALL_DYN_LINK?

 To make the example_project compile in you environment you first have to
 set the library and include directories
 according to you boost root.
 (AdditionalLibraryDirectories AdditionalIncludeDirectories in the project
 file.)
 The exe is put to example_project\debug\output.
 A file containing the error message is also in example_project.

 Best regards,
 Benedikt Huber

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5371>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC