fatal error C1047: The object or library file "..."was created with an older compiler than other obj

本文详细介绍了如何解决在使用VS2005进行代码编译时,在发布模式下遇到的问题。通过安装SP1升级包,可以彻底解决此错误。此外,文章还推荐了升级到更高版本的Visual Studio作为替代方案。
部署运行你感兴趣的模型镜像

Debug下编译正常生成,切换到Release就报这个错误。


昨天用VS2005变异时遇到的这个问题,网上搜了一大堆,试了很多不见效。微软这货真是坑爹!


终极解决方法:安装SP1升级包,去搜索:sp1-KB926601-X86-ENU吧。(我用的英文版VS2005,所以这里是英文版的),网上的其他的解决方法都是扯淡,浪费时间。


还有种方法:升级VS,建议使用VS2008及以上版本。

您可能感兴趣的与本文相关的镜像

Yolo-v8.3

Yolo-v8.3

Yolo

YOLO(You Only Look Once)是一种流行的物体检测和图像分割模型,由华盛顿大学的Joseph Redmon 和Ali Farhadi 开发。 YOLO 于2015 年推出,因其高速和高精度而广受欢迎

Microsoft Windows [版本 10.0.22631.5335] (c) Microsoft Corporation。保留所有权利。 C:\Users\dell>make --version GNU Make 4.1 Built for x86_64-pc-mingw32 Copyright (C) 1988-2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. C:\Users\dell>cmake --version cmake version 3.27.4 CMake suite maintained and supported by Kitware (kitware.com/cmake). C:\Users\dell>gcc --version gcc (Rev3, Built by MSYS2 project) 13.2.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. C:\Users\dell>arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Linaro GCC 4.9-2017.01) 4.9.4 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. C:\Users\dell>cd /d D:\20241207\KPC_PEPTXDLRI_Windos\build D:\20241207\KPC_PEPTXDLRI_Windos\build>cmake .. -G "MinGW Makefiles" CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. -- The C compiler identification is GNU 13.2.0 -- The CXX compiler identification is GNU 13.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/VS CODE anzhuangweizhi/ucrt64/bin/cc.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: D:/VS CODE anzhuangweizhi/ucrt64/bin/c++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Git version is main: -- Configuring done (9.3s) -- Generating done (0.1s) -- Build files have been written to: D:/20241207/KPC_PEPTXDLRI_Windos/build D:\20241207\KPC_PEPTXDLRI_Windos\build>mingw32-make [ 2%] Building CXX object app_PEPTXDLRI/CMakeFiles/PEPTXDLRI_APP.dir/PEPTXDLRI_console.cpp.obj In file included from D:\20241207\KPC_PEPTXDLRI_Windos\app_PEPTXDLRI\PEPTXDLRI_console.cpp:11: D:/20241207/KPC_PEPTXDLRI_Windos/app_PEPTXDLRI/hvac_if/logic_ptu.h:14:10: fatal error: arpa/inet.h: No such file or directory 14 | #include <arpa/inet.h> | ^~~~~~~~~~~~~ compilation terminated. mingw32-make[2]: *** [app_PEPTXDLRI\CMakeFiles\PEPTXDLRI_APP.dir\build.make:76: app_PEPTXDLRI/CMakeFiles/PEPTXDLRI_APP.dir/PEPTXDLRI_console.cpp.obj] Error 1 mingw32-make[1]: *** [CMakeFiles\Makefile2:117: app_PEPTXDLRI/CMakeFiles/PEPTXDLRI_APP.dir/all] Error 2 mingw32-make: *** [Makefile:90: all] Error 2 D:\20241207\KPC_PEPTXDLRI_Windos\build>
06-26
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值