【转】CMake Error: The current CMakeCache.txt directory CMakeCache.txt is different than the directory
轉(zhuǎn)自:CMake Error: The current CMakeCache.txt directory is different..._萬俟淋曦的進擊手記-CSDN博客
零、問題描述
開始學(xué)ROS時,需要編譯別人的功能包,常常把別人的工作空間拿過來使用,但編譯時會出現(xiàn)各種錯誤,如下的目錄問題:
CMake Error: The current CMakeCache.txt directory /home/vistar/desktop/catkin_ws/build/CMakeCache.txt is different than the directory /home/vistar/桌面/catkin_ws/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/vistar/desktop/catkin_ws/src/CMakeLists.txt” does not match the source “/home/vistar/桌面/catkin_ws/src/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.
Invoking “cmake” failed.
一、問題分析
(可能編譯時,編譯器會根據(jù)記錄尋找CMakeCache.txt 文件,這塊不懂)
第二個錯誤也是因為原有記錄和現(xiàn)在的目錄不一致,不過是CMakeLists.txt文件。
我以前修改過Ubuntu的目錄名,可能是因為這個。
二、解決辦法
三、總結(jié)
自己試出來的方法,也許可以通過修改某個文件來解決,如果你有更好的辦法,希望可以在下面留言,謝謝你的分享。
總結(jié)
以上是生活随笔為你收集整理的【转】CMake Error: The current CMakeCache.txt directory CMakeCache.txt is different than the directory的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 什么叫权益类基金?权益类基金的优缺点
- 下一篇: 信用卡交电费能提额吗