Error C1047: Object file created with an older compiler than other objects(错误 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.exe 和 link.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:使用比其他对象更旧的编译器创建的对象文件
基础教程推荐
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- CString 到 char* 2021-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
