VS2012下 MFC程序报错,该如何解决
VS2012下 MFC程序报错
运行报错:
1>e:\xuexi\vs 2012 旗舰版\vc\atlmfc\include\atlcore.h(638): error C2039: “SetDefaultDllDirectories”: 不是“`global namespace'”的成员
1>e:\xuexi\vs 2012 旗舰版\vc\atlmfc\include\atlcore.h(638): error C2065: “SetDefaultDllDirectories”: 未声明的标识符
1>e:\xuexi\vs 2012 旗舰版\vc\atlmfc\include\atlcore.h(640): error C2065: “LOAD_LIBRARY_SEARCH_SYSTEM32”: 未声明的标识符
那几个函数下面画的都有红色的波浪线......
求大神告诉解决方法
------解决思路----------------------
尝试以下步骤:
1. 更新VS2012补丁包SP1以上
2. 设置项目属性-常规-平台工具集,选中Visual Studio 2012 - Windows XP (v110_xp)
运行报错:
1>e:\xuexi\vs 2012 旗舰版\vc\atlmfc\include\atlcore.h(638): error C2039: “SetDefaultDllDirectories”: 不是“`global namespace'”的成员
1>e:\xuexi\vs 2012 旗舰版\vc\atlmfc\include\atlcore.h(638): error C2065: “SetDefaultDllDirectories”: 未声明的标识符
1>e:\xuexi\vs 2012 旗舰版\vc\atlmfc\include\atlcore.h(640): error C2065: “LOAD_LIBRARY_SEARCH_SYSTEM32”: 未声明的标识符
#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
那几个函数下面画的都有红色的波浪线......
求大神告诉解决方法
------解决思路----------------------
尝试以下步骤:
1. 更新VS2012补丁包SP1以上
2. 设置项目属性-常规-平台工具集,选中Visual Studio 2012 - Windows XP (v110_xp)