#include <direct.h>
#include <Windows.h>
#include <boost/filesystem.hpp>
#include <stdio.h>
//获取exe或dll所在的路径
wchar_t defaultPath[MAX_PATH];
GetModuleFileName(NULL, defaultPath, MAX_PATH);
std::wcout << defaultPath << std::endl;
boost::filesystem::path programPath(defaultPath);
std::string dir=programPath.parent_path().string();
获取exe或dll所在的路径
于 2023-12-06 13:07:17 首次发布