From 6ca1c191b6ecb25de97ddfa362a79dfc99eecd36 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 30 Apr 2009 17:30:14 +0000 Subject: [PATCH] some windows fixes for dynamic linking --- include/libtorrent/aux_/session_impl.hpp | 4 ++-- include/libtorrent/config.hpp | 1 + include/libtorrent/connection_queue.hpp | 2 +- include/libtorrent/disk_buffer_holder.hpp | 4 ++-- include/libtorrent/error_code.hpp | 2 +- include/libtorrent/natpmp.hpp | 2 +- include/libtorrent/upnp.hpp | 2 +- src/error_code.cpp | 2 +- test/setup_transfer.hpp | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 64d94a010..c70db7755 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -89,12 +89,12 @@ namespace libtorrent class upnp; class natpmp; class lsd; - class fingerprint; + struct fingerprint; class torrent; namespace dht { - class dht_tracker; + struct dht_tracker; }; namespace aux diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 247cba154..3e272beb6 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -53,6 +53,7 @@ POSSIBILITY OF SUCH DAMAGE. #elif defined(BOOST_MSVC) #pragma warning(disable: 4258) +#pragma warning(disable: 4251) # if defined(TORRENT_BUILDING_SHARED) # define TORRENT_EXPORT __declspec(dllexport) diff --git a/include/libtorrent/connection_queue.hpp b/include/libtorrent/connection_queue.hpp index c41124e64..abfce1de1 100644 --- a/include/libtorrent/connection_queue.hpp +++ b/include/libtorrent/connection_queue.hpp @@ -47,7 +47,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { -class connection_queue : public boost::noncopyable +class TORRENT_EXPORT connection_queue : public boost::noncopyable { public: connection_queue(io_service& ios); diff --git a/include/libtorrent/disk_buffer_holder.hpp b/include/libtorrent/disk_buffer_holder.hpp index 2de858e3a..d5536cedf 100644 --- a/include/libtorrent/disk_buffer_holder.hpp +++ b/include/libtorrent/disk_buffer_holder.hpp @@ -40,8 +40,8 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { - namespace aux { class session_impl; } - class disk_buffer_pool; + namespace aux { struct session_impl; } + struct disk_buffer_pool; struct TORRENT_EXPORT disk_buffer_holder { diff --git a/include/libtorrent/error_code.hpp b/include/libtorrent/error_code.hpp index c0f84a5b0..288a4588f 100644 --- a/include/libtorrent/error_code.hpp +++ b/include/libtorrent/error_code.hpp @@ -93,7 +93,7 @@ namespace libtorrent { return boost::system::error_condition(ev, *this); } }; - extern libtorrent_error_category libtorrent_category; + extern TORRENT_EXPORT libtorrent_error_category libtorrent_category; using boost::system::error_code; inline boost::system::error_category const& get_system_category() diff --git a/include/libtorrent/natpmp.hpp b/include/libtorrent/natpmp.hpp index 52d528a16..aa9d0b275 100644 --- a/include/libtorrent/natpmp.hpp +++ b/include/libtorrent/natpmp.hpp @@ -47,7 +47,7 @@ namespace libtorrent // std::string: error message typedef boost::function portmap_callback_t; -class natpmp : public intrusive_ptr_base +class TORRENT_EXPORT natpmp : public intrusive_ptr_base { public: natpmp(io_service& ios, address const& listen_interface, portmap_callback_t const& cb); diff --git a/include/libtorrent/upnp.hpp b/include/libtorrent/upnp.hpp index 31d542bdc..a7b80de89 100644 --- a/include/libtorrent/upnp.hpp +++ b/include/libtorrent/upnp.hpp @@ -62,7 +62,7 @@ namespace libtorrent // an informational log message typedef boost::function portmap_callback_t; -class upnp : public intrusive_ptr_base +class TORRENT_EXPORT upnp : public intrusive_ptr_base { public: upnp(io_service& ios, connection_queue& cc diff --git a/src/error_code.cpp b/src/error_code.cpp index 17fc1739f..c443f18e6 100644 --- a/src/error_code.cpp +++ b/src/error_code.cpp @@ -76,7 +76,7 @@ namespace libtorrent return msgs[ev]; } - libtorrent_error_category libtorrent_category; + TORRENT_EXPORT libtorrent_error_category libtorrent_category; #else diff --git a/test/setup_transfer.hpp b/test/setup_transfer.hpp index 0f75f0669..4fce67954 100644 --- a/test/setup_transfer.hpp +++ b/test/setup_transfer.hpp @@ -39,7 +39,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { class alert; - class add_torrent_params; + struct add_torrent_params; } bool print_alerts(libtorrent::session& ses, char const* name