diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce6e97247..9d249d16b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ set(sources
web_connection_base
alert
allocator
+ asio
assert
bandwidth_limit
bandwidth_manager
@@ -142,6 +143,7 @@ else (dht)
endif (dht)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
+set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fvisibility-inlines-hidden")
if (shared)
add_library(torrent-rasterbar SHARED ${sources2})
@@ -157,7 +159,7 @@ include_directories(${Boost_INCLUDE_DIR})
target_link_libraries(torrent-rasterbar ${Boost_LIBRARIES})
# this works around a bug in asio in boost-1.39
-add_definitions(-DBOOST_ASIO_HASH_MAP_BUCKETS=1021)
+add_definitions(-DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_ASIO_DYN_LINK)
if (WIN32)
target_link_libraries(torrent-rasterbar wsock32 ws2_32)
diff --git a/Jamfile b/Jamfile
index 32a51cd18..3d11e1ed7 100755
--- a/Jamfile
+++ b/Jamfile
@@ -31,6 +31,13 @@ rule linking ( properties * )
{
local result ;
+ if shared in $(properties)
+ {
+ # make sure asio symbols are properly exported
+ # and imported
+ result += BOOST_ASIO_DYN_LINK ;
+ }
+
# openssl libraries, if enabled
if openssl in $(properties)
{
@@ -61,7 +68,6 @@ rule linking ( properties * )
# linker library on linux, required when using openssl
result += dl ;
}
-
}
if windows in $(properties)
@@ -83,11 +89,6 @@ rule linking ( properties * )
result += gcrypt /opt/local/include ;
}
- if tommath in $(properties)
- {
- result +=