2
0
mirror of https://github.com/boostorg/dll.git synced 2026-02-01 20:32:22 +00:00

More b2 related workarounds for MinGW, simplified Windows code and fixed warnings

This commit is contained in:
Antony Polukhin
2015-12-29 23:04:58 +03:00
parent a2f08eb656
commit f8ef7e176c
4 changed files with 23 additions and 32 deletions

5
example/tutorial9/tutorial9.cpp Normal file → Executable file
View File

@@ -8,7 +8,8 @@
#if BOOST_OS_WINDOWS
//[callplugcpp_tutorial9
#include <boost/dll/import.hpp> // for import
#include <boost/dll/import.hpp> // for dll::import
#include <boost/dll/shared_library.hpp> // for dll::shared_library
#include <boost/function.hpp>
#include <iostream>
#include <windows.h>
@@ -20,7 +21,7 @@ int main() {
// OPTION #0, requires C++11 compatible compiler that understands GetStdHandle_t signature.
/*<-*/
#if !defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) /*->*/
#if defined(_MSC_VER) && !defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) /*->*/
auto get_std_handle = dll::import<GetStdHandle_t>(
"Kernel32.dll",
"GetStdHandle"