| 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 | //[callplugcpp_tutorial8_static |
| 9 | #include <boost/dll/runtime_symbol_info.hpp> // program_location() |
| 10 | #include <iostream> |
| 11 | #include "refcounting_plugin.hpp" |
| 12 | |
| 13 | int main() { |
| 14 | boost::shared_ptr<my_refcounting_api> plugin = get_plugin( |
| 15 | path: boost::dll::program_location(), |
| 16 | func_name: "create_refc_plugin" |
| 17 | ); |
| 18 | |
| 19 | std::cout << "Plugin name: "<< plugin->name() |
| 20 | << ", \nlocation: "<< plugin->location() |
| 21 | << std::endl; |
| 22 | } |
| 23 | //] |
| 24 |
