gpt4 book ai didi

mfc - 错误 C2039 : “SetDefaultDllDirectories” :is not a member of global namespace

转载 作者:行者123 更新时间:2023-12-04 01:57:02 41 4
gpt4 key购买 nike

xxx\vc\atlmfc\include\atlcore.h(638):错误 C2039:“SetDefaultDllDirectories”:不是“全局命名空间”的成员

#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

里面的功能都是VS没有实现的
那么我该如何解决这个问题呢?
libray有问题吗?我在VS2012中运行这个程序

最佳答案

您必须确保在您的项目属性中定义了“_USING_V110_SDK71_”。 Visual Studio 会自动为您定义它。它通常不会“出现”,因为“从父级或项目默认值继承”未选中。

我发现当从旧的 atl 项目升级时,stdafx.cpp 出于某种原因未勾选“继承自父级或项目默认值”是很常见的。

您应该检查项目设置以及各个 stdafx.cpp 文件设置,以确定在预处理器定义中是否选中了“从父项或项目默认值继承”复选框。在某些情况下,会检查项目文件的预处理器定义对话框,但不会检查特定 stdafx.cpp 文件的预处理器定义对话框。

关于mfc - 错误 C2039 : “SetDefaultDllDirectories” :is not a member of global namespace,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16698882/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com