tutorial8_static.cpp 705 B

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