SetDefaultDllDirectories问题

换台电脑编译报错!

在使用Visual Studio 2013编译程序的时候报以下错误

vc\atlmfc\include\atlcore.h(638): error C2039: “”: 不是“`global namespace’”的成员

vc\atlmfc\include\atlcore.h(638): error C2065: “SetDefaultDllDirectories”: 未声明的标识符

vc\atlmfc\include\atlcore.h(640): error C2065: “LOAD_LIBRARY_SEARCH_SYSTEM32”: 未声明的标识符

解决方法:

方法(一)

LOAD_LIBRARY_SEARCH_SYSTEM32这个值在Windows XP和Windows Server 2003上是不支持的,参考:LoadLibraryEx。

你可以改用LOAD_WITH_ALTERED_SEARCH_PATH并且用lpFileName指定一个绝对路径 或者改用LoadLibrary。

 

方法(二)

2. 设置项目属性-常规-平台工具集,选中Visual Studio 2013 – Windows XP (v120_xp)

注意此方法:我换回自己电脑会导致报错error C2061: 语法错误: 标识符“DEVICE_SCALE_FACTOR”

解决:平台工具集换回Visual Studio 2013 – (v120)即可。

【转】https://blog.csdn.net/fcxterry/article/details/78213022

posted on 2019-06-28 10:18  lydstory  阅读(817)  评论(0编辑  收藏  举报

导航