Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/161.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ SetDllDirectory未在此范围内声明Netbeans 7.1_C++_Compiler Errors_Setdlldirectory - Fatal编程技术网

C++ SetDllDirectory未在此范围内声明Netbeans 7.1

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(),但是在编译项目时,我得到的错误如下:

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