xxx\\vc\\atlmfc\\include\\atlcore.h(638): error C2039: “SetDefaultDllDirectories”: is not a member of \"global namespace\"
#ifndef _USING_V110_SDK71_
//
I had the same issue . this trick work for me. this issue comes when visual studio can't load development environment properly . can't load environment variables. so I have tried this and it works fine.
Step #1
Start command prompt of visual studio which you are using
Step #2 run this command .
devenv /useenv
this command will open visual studio and then open your project and compile.
I copy _USING_V110_SDK71_ in part C/C++ in sub branch preprocessor / preprocessor definition and once unchech inherit from parent ... and do build project and then recheck this option and solved problem
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.
I have had similar problem using VS2008, it was not recognizing a function. I solved it by adding DDX_Control to the DoDataExchange(CDataExchange* pDX).
Put following lines in include above all
$(VC_IncludePath)
$(WindowsSDK_IncludePath)
Uncheck check box "inherit from parent or project defaults"