dyn_link.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
  2. // (C) Copyright 2003-2007 Jonathan Turkanis
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
  5. // See http://www.boost.org/libs/iostreams for documentation.
  6. // Adapted from http://www.boost.org/more/separate_compilation.html, by
  7. // John Maddock.
  8. #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
  9. #define BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
  10. #if defined(_MSC_VER)
  11. # pragma once
  12. #endif
  13. #include <boost/config.hpp>
  14. #include <boost/detail/workaround.hpp>
  15. //------------------Enable dynamic linking on windows-------------------------//
  16. #ifdef BOOST_HAS_DECLSPEC
  17. # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK)
  18. # ifdef BOOST_IOSTREAMS_SOURCE
  19. # define BOOST_IOSTREAMS_DECL __declspec(dllexport)
  20. # else
  21. # define BOOST_IOSTREAMS_DECL __declspec(dllimport)
  22. # endif
  23. # endif
  24. //--------------Enable dynamic linking for non-windows---------------------//
  25. #else // BOOST_HAS_DECLSPEC
  26. # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK)
  27. # ifdef BOOST_IOSTREAMS_SOURCE
  28. # define BOOST_IOSTREAMS_DECL BOOST_SYMBOL_EXPORT
  29. # else
  30. # define BOOST_IOSTREAMS_DECL BOOST_SYMBOL_IMPORT
  31. # endif
  32. # endif
  33. #endif
  34. #ifndef BOOST_IOSTREAMS_DECL
  35. # define BOOST_IOSTREAMS_DECL
  36. #endif
  37. #endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED