tutorial8.cpp 778 B

12345678910111213141516171819202122232425
  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. #include "../b2_workarounds.hpp"
  8. //[callplugcpp_tutorial8
  9. #include <iostream>
  10. #include "refcounting_api.hpp"
  11. int main(int argc, char* argv[]) {
  12. /*<-*/ b2_workarounds::argv_to_path_guard guard(argc, argv); /*->*/
  13. boost::shared_ptr<my_refcounting_api> plugin = get_plugin(
  14. boost::dll::fs::path(argv[1]) / "refcounting_plugin",
  15. "create_refc_plugin"
  16. );
  17. std::cout << "Plugin name: " << plugin->name()
  18. << ", \nlocation: " << plugin->location()
  19. << std::endl;
  20. }
  21. //]