From b76e5d22d9e7a0c5a9cea519ea2d86142f96ff9d Mon Sep 17 00:00:00 2001 From: Anton Polukhin Date: Tue, 30 Sep 2014 23:35:08 +0400 Subject: [PATCH] Fix Windows related build issues --- example/shared_lib_path.hpp | 4 ---- example/tutorial8/tutorial8.cpp | 4 +++- test/Jamfile.v2 | 11 +++-------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/example/shared_lib_path.hpp b/example/shared_lib_path.hpp index b92532d..f23d461 100644 --- a/example/shared_lib_path.hpp +++ b/example/shared_lib_path.hpp @@ -52,10 +52,6 @@ boost::filesystem::path shared_lib_path(const boost::filesystem::path& root, con # include #endif -#ifndef BOOST_LIB_NAME -# error "Macro BOOST_LIB_NAME not set (internal error)" -#endif - // // error check: // diff --git a/example/tutorial8/tutorial8.cpp b/example/tutorial8/tutorial8.cpp index 86dcd92..b762925 100644 --- a/example/tutorial8/tutorial8.cpp +++ b/example/tutorial8/tutorial8.cpp @@ -4,6 +4,8 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "../shared_lib_path.hpp" // contains BJAM_LIBRARY_DECORATIONS macro to workaround --layout=X + //[callplugcpp_tutorial8 #include #include "refcounting_api.hpp" @@ -15,7 +17,7 @@ int main(int argc, char* argv[]) { BOOST_ASSERT(argc >= 2); //-> boost::shared_ptr plugin = get_plugin( - boost::filesystem::path(argv[1]) / "refcounting_plugin", + boost::filesystem::path(argv[1]) / "refcounting_plugin"/*<-*/ BJAM_LIBRARY_DECORATIONS /*->*/, "create_refc_plugin" ); diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index cca6c5b..149db69 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -15,7 +15,7 @@ path-constant TEST_DIR : $(BOOST_ROOT)/bin.v2/libs/dll/test ; # Static library that is not linked with any of the boost libs lib static_plugin : ../example/tutorial4/static_plugin.cpp : static : : linux:"-rdynamic" ; -lib static_refcounting_plugin : ../example/tutorial8/refcounting_plugin.cpp : static : : linux:"-rdynamic" ; +lib static_refcounting_plugin : ../example/tutorial8/refcounting_plugin.cpp : static : : release linux:"-rdynamic" ; project : source-location . @@ -25,7 +25,6 @@ project linux:"-ldl" linux:"-fvisibility=hidden" # others - shared:BOOST_ALL_DLL /boost/system//boost_system /boost/filesystem//boost_filesystem multi @@ -47,7 +46,7 @@ project : $(TEST_DIR) ; - test-suite application + test-suite boostdll : [ run shared_library_load_test.cpp : $(TEST_DIR) ] [ run shared_library_search_symbol_test.cpp : $(TEST_DIR) : : linux:"-rdynamic" ] @@ -75,11 +74,7 @@ project [ run ../example/tutorial6/tutorial6.cpp : $(TEST_DIR) ] [ run ../example/tutorial7/tutorial7.cpp : $(TEST_DIR) ] [ run ../example/tutorial8/tutorial8.cpp : $(TEST_DIR) ] - [ run ../example/tutorial8/tutorial8_static.cpp - : $(TEST_DIR) - : - : release static_refcounting_plugin linux:"-rdynamic" always_show_run_output - ] + [ run ../example/tutorial8/tutorial8_static.cpp ../example/tutorial8/refcounting_plugin.cpp : $(TEST_DIR) : : release always_show_run_output ] [ compile-fail section_name_too_big.cpp ] [ compile-fail not_a_function.cpp ] ;