错误 C1047:使用比其他对象更旧的编译器创建的对象文件

Error C1047: Object file created with an older compiler than other objects(错误 C1047:使用比其他对象更旧的编译器创建的对象文件)

本文介绍了错误 C1047:使用比其他对象更旧的编译器创建的对象文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我正在 Windows 7 上的 Visual Studio 2008 SP1 中以 C++ 发布模式构建,当我构建它时,我不断收到:

I have a project that I'm building in C++ in Release mode in Visual Studio 2008 SP1 on Windows 7 and when I build it I keep getting:

致命错误 C1047:对象或库文件'.Releasefoobar.obj'是用较旧的编译器创建的比其他物体;重建旧的对象和库.

fatal error C1047: The object or library file '.Releasefoobar.obj' was created with an older compiler than other objects; rebuild old objects and libraries.

链接时发生错误.

我尝试删除特定的目标文件并重新构建,但这并不能解决问题.我也试过吹掉整个发布构建文件夹并重建,但这也没有解决它.有什么想法吗?

I've tried deleting the specific object file and rebuilding but that doesn't fix it. I've also tried blowing away the whole release build folder and rebuilding but that also didn't fix it. Any ideas?

推荐答案

我建议重新安装 VS 2008 SP1.在此期间您是否安装了不同的 VS(例如 VS Express)?已知这会干扰现有的 VS 安装.

I would suggest reinstalling VS 2008 SP1. Have you installed a different VS (e.g. VS Express) in the meantime? This is known to cause interference with an existing VS installation.

您可以尝试通过从 Visual Studio 命令提示符运行 cl.exelink.exe 来检查编译器和链接器版本.

You could try checking the compiler and linker versions by running cl.exe and link.exe from the Visual Studio command prompt.

这篇关于错误 C1047:使用比其他对象更旧的编译器创建的对象文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:错误 C1047:使用比其他对象更旧的编译器创建的对象文件

基础教程推荐