| 1 | // Copyright 2014 Renato Tegon Forti, Antony Polukhin. |
| 2 | // Copyright Antony Polukhin, 2015-2024. |
| 3 | // |
| 4 | // Distributed under the Boost Software License, Version 1.0. |
| 5 | // (See accompanying file LICENSE_1_0.txt |
| 6 | // or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 7 | |
| 8 | // MinGW related workaround |
| 9 | #define BOOST_DLL_FORCE_ALIAS_INSTANTIATION |
| 10 | |
| 11 | //[plugcpp_tutorial7_library1 |
| 12 | #include <boost/dll/alias.hpp> // for BOOST_DLL_ALIAS_SECTIONED |
| 13 | #include <iostream> |
| 14 | #include <string> |
| 15 | |
| 16 | void print(const std::string& s) { |
| 17 | std::cout << "Hello, " << s << '!' << std::endl; |
| 18 | } |
| 19 | |
| 20 | BOOST_DLL_ALIAS_SECTIONED(print, print_hello, Anna) |
| 21 | //] |
| 22 | |