static_plugin.hpp 779 B

12345678910111213141516171819202122
  1. // Copyright 2014 Renato Tegon Forti, Antony Polukhin.
  2. // Copyright 2015-2019 Antony Polukhin.
  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. //[plugcpp_my_plugin_static
  8. #include <boost/dll/alias.hpp> // for BOOST_DLL_ALIAS
  9. #include <boost/shared_ptr.hpp>
  10. #include "../tutorial_common/my_plugin_api.hpp"
  11. namespace my_namespace {
  12. boost::shared_ptr<my_plugin_api> create_plugin(); // Forward declaration
  13. } // namespace my_namespace
  14. BOOST_DLL_ALIAS(
  15. my_namespace::create_plugin, // <-- this function is exported with...
  16. create_plugin // <-- ...this alias name
  17. )
  18. //]