您的位置:首页 > 其它

fatal error C1047 对象或库文件“....Win32Release xxx.obj”是使用比创建其他对象所用编译器旧的编译器创建的;请重新生成旧的对象和库

2012-07-31 16:23 501 查看
编译xxx动态库

vs2008已经打了sp1补丁

x64|release可以编译链接通过

win32|debug可以编译链接通过

win32|release编译链接不通过

原因:

引用库不一致,部分库使用的是带sp1补丁的编译器编译,部分是不带sp1补丁的编译器编译。

解决方法:

查找所有引用的库文件,确定所有库编译环境一致(第三方库较为麻烦)。

引用的库文件使用不同的编译器编译会导致该问题,要么所有的库使用没有sp1补丁的编译器编译,

要么使用有sp1补丁的编译器编译。

msdn解决方法

http://msdn.microsoft.com/en-us/library/ms173554(v=vs.80).aspx

Fatal Error C1047

Error Message

The object or library file 'file' was created with an older compiler than other objects; rebuild old objects and libraries

C1047 is caused when object files or libraries built with /LTCG are linked together, but where those object files or libraries are built with different versions of the Visual C++ toolset.

This can happen if you begin using a new version of the compiler but do not do a clean rebuild of existing object files or libraries.

To resolve C1047, rebuild all object files or libraries.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐