error C2039: “SetDefaultDllDirectories”:is not a member of global namespace

前端 未结 7 1413
無奈伤痛
無奈伤痛 2021-01-11 16:56

xxx\\vc\\atlmfc\\include\\atlcore.h(638): error C2039: “SetDefaultDllDirectories”: is not a member of \"global namespace\"

#ifndef _USING_V110_SDK71_
    //          


        
相关标签:
7条回答
  • 2021-01-11 17:05

    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.

    0 讨论(0)
  • 2021-01-11 17:16

    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

    0 讨论(0)
  • 2021-01-11 17:19

    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.

    0 讨论(0)
  • 2021-01-11 17:19

    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.

    0 讨论(0)
  • 2021-01-11 17:22

    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).

    0 讨论(0)
  • 2021-01-11 17:24
    1. Put following lines in include above all

      $(VC_IncludePath)
      $(WindowsSDK_IncludePath)

    2. Uncheck check box "inherit from parent or project defaults"

    0 讨论(0)
提交回复
热议问题