I know this question has been asked before but I still haven\'t seen a satisfactory answer, or a definitive \"no, this cannot be done\", so I\'ll ask again!
All I wa
If using C++17 one can do the following to get the path to the executable.
#include std::filesystem::path getExecutablePath() { return std::filesystem::canonical("/proc/self/exe"); }
The above answer has been tested on Debian 10 using G++ 9.3.0