SetDllDirectory Not declared in this scope-Netbeans 7.1

675 Views Asked by At

I am using SetDllDirectory() in one of the codes i write however on compiling the project i get error as :

SetDllDirectory was not declared in this scope

Here's the code snippet

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");

}
1

There are 1 best solutions below

0
On

What is the value of the preprocessor constant _WIN32_WINNT ? It is defined in the file WinBase.h, which might give some information.

Microsoft documentation about SetDllDirectory ( https://msdn.microsoft.com/en-us/library/windows/desktop/ms686203%28v=vs.85%29.aspx ) says:

To compile an application that uses this function, define _WIN32_WINNT as 0x0502 

With Visual Studio, you should also check that the project property "Platform toolset" is set to the minimum value of "v100".