...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::dll::program_location
// In header: <boost/dll/runtime_symbol_info.hpp> boost::dll::fs::path program_location(boost::dll::fs::error_code & ec); boost::dll::fs::path program_location();
On success returns full path and name of the currently running program (the one which contains the main()
function).
Return value can be used as a parameter for shared_library
. See Tutorial "Linking plugin into the executable" for usage example. Flag '-rdynamic' must be used when linking the plugin into the executable on Linux OS.
Parameters: |
|
||
Throws: |
std::bad_alloc in case of insufficient memory. Overload that does not accept boost::dll::fs::error_code also throws boost::dll::fs::system_error. |