C++项目更改位置或重命名后无法编译与运行

错误内容:

CMake Error: The current CMakeCache.txt directory /home/xiexiaotong/桌面/yolov5_tensorRT/build/CMakeCache.txt is different than the directory /home/xiexiaotong/桌面/tensorrtx/yolov5/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The source “/home/xiexiaotong/桌面/yolov5_tensorRT/CMakeLists.txt” does not match the source “/home/xiexiaotong/桌面/tensorrtx/yolov5/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.

解决方法

这个错误提示是由于 CMakeCache.txt 目录与创建 CMakeCache.txt 的目录不同导致的。这可能会导致二进制文件被创建在错误的位置。
只要删除build,然后重新编译就行了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值