C++ SetDllDirectory未在此范围内声明Netbeans 7.1
我在我编写的一个代码中使用了SetDllDirectory(),但是在编译项目时,我得到的错误如下:C++ SetDllDirectory未在此范围内声明Netbeans 7.1,c++,compiler-errors,setdlldirectory,C++,Compiler Errors,Setdlldirectory,我在我编写的一个代码中使用了SetDllDirectory(),但是在编译项目时,我得到的错误如下: SetDllDirectory was not declared in this scope 下面是代码片段 void LoadDLLPath() { wxString value; if (regkeyExists) { if (regkey->HasValue("LibPath")) { regkey->QueryValue("LibPath", val
SetDllDirectory was not declared in this scope
下面是代码片段
void LoadDLLPath() {
wxString value;
if (regkeyExists) {
if (regkey->HasValue("LibPath")) {
regkey->QueryValue("LibPath", value);
if (!value.empty()) {
wxSetEnv("ImpressionLib", value);
SetDllDirectory(value.c_str());
}
}
}
SetDllDirectory("C:\\Program Files\\Project\\ABCPROJECT\\lib");
wxSetEnv("ProjectPath", "C:\\Program Files\\Project\\ABCPROJECT\\lib");
}
预处理器常数WINNT的值是多少?它在文件WinBase.h中定义,该文件可能会提供一些信息 关于SetDllDirectory()的Microsoft文档说明:
使用Visual Studio,还应检查项目属性“平台工具集”是否设置为最小值“v100”。是否包含必要的标题?是的,我确实包含了
To compile an application that uses this function, define _WIN32_WINNT as 0x0502