xxx\vc\atlmfc\include\atlcore.h(638): error C2039: “SetDefaultDllDirectories”: is not a member of "global namespace"
#ifndef _USING_V110_SDK71_
// the LOAD_LIBRARY_SEARCH_SYSTEM32 flag for LoadLibraryExW is only supported if the DLL-preload fixes are installed, so
// use LoadLibraryExW only if SetDefaultDllDirectories is available (only on Win8, or with KB2533623 on Vista and Win7)...
IFDYNAMICGETCACHEDFUNCTION(L"kernel32.dll", SetDefaultDllDirectories, pfSetDefaultDllDirectories)
{
return(::LoadLibraryExW(pszLibrary, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32));
}
#endif
the functions in it are all not realized by VS
so how do I solve this problem?
is there something wrong with the libray?I run this program in VS2012
Changing the order of Include Directories and included SDK folder works for me:
$(IncludePath);C:\Program Files x86\Microsoft SDKs\Windows\v7.1A\Include
If I put folder C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.1A\Include
before $(IncludePath)
, I will get this error.
I also met this issue on VS 2012.
This is caused because you are using the Windows SDK 7.1 which lacks of SetDefaultDllDirectories
function call in VS 2012 (VC11). You may notice there is #ifndef _USING_V110_SDK71_
guarded flag to avoid using undefined SetDefaultDllDirectories
.
Just define _USING_V110_SDK71_
in your project to let SDK knows you are in this toolset or upgrade to higher version of SDK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With