CMake Error: The current CMakeCache.txt directory is different...

使用 NXP sdk编译时会出现如下错误:
CMake Error: The current CMakeCache.txt directory /home/***/build/CMakeCache.txt is different than the directory /home/***/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/***/CMakeLists.txt” does not match the source “/home/***/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.
Invoking “cmake” failed.

一、问题分析

错误提示翻译一下就是你现在的CMakeCache.txt 文件路径和编译文件记录的CMakeCache.txt 路径不一样。
这是因为之前在别的地方使用别人的环境编译了一次,生成了build目录及里面的文件,在这里再次编译时发现与原来的路径不对造成的。总之问题应该是:这不是第一次编译,其中有些编译生成的文件,导致二次编译时报错。
二、解决办法

将…/build/CMakeCache.txt这个目录中的build目录整个删除就ok了。

三、总结
如果你有更好的办法,希望可以在下面留言,谢谢你的分享

CMake Error: The current CMakeCache.txt directory is different...相关推荐

  1. 【转】CMake Error: The current CMakeCache.txt directory CMakeCache.txt is different than the directory

    转自:CMake Error: The current CMakeCache.txt directory is different..._万俟淋曦的进击手记-CSDN博客 零.问题描述 开始学ROS时 ...

  2. CMake Error: The current CMakeCache.txt directory is different than the other

    CMake Error: The current CMakeCache.txt directory is different than the other - CMake安装报错:CMakeCache ...

  3. CMake安装时报错:The current CMakeCache.txt directory /home/joes/jiao/01_YHWorker/03_setupbag/cmake-3.19.2

    一.问题描述: CMake Error: The current CMakeCache.txt directory /home/joes/jiao/01_YHWorker/03_setupbag/cm ...

  4. Ubuntu下cmake报错:The current CMakeCache.txt directory...is different from...

    先说一下个人使用的环境和建立工程的方式: 环境:ubuntu20.04+cmake+vscode, 建立的是C++工程. 方式:用的是较为简单的方式.建立一个工程目录,下面有一个build目录,一个c ...

  5. CMakeCache.txt is different 错误

    把caffe目录拷贝到faster_rcnn-master下然后编译报错 wzy@wzy-ubuntu:~/faster_rcnn-master2/external/caffe/build$ sudo ...

  6. CMake Error:Cannot specify link libraries for target

    问题描述:ros学习中,一个小插曲,还以为出什么大问题了,真是苦笑不得 CMake Error at hello/CMakeLists.txt:138 (target_link_libraries): ...

  7. 如何解决CMake Error: The source directory ““ does not exist

    在linux系统上编译C++代码时常常出现CMake Error: The source directory "" does not exist 详细报错信息为: CMake Er ...

  8. CMake Error at CMakeLists.txt:97 (ADD_TARGET_DEFINITIONS): Unknown CMake command ADD_TARGET_DEFIN

    cmake 编译一直出错 $ cmake --version cmake version 3.14.3 – The C compiler identification is GNU 7.3.0 – T ...

  9. cmake error: the source directory “xxx“ does not exist.specify --help for usage, or ...

    在我的共享文件夹添加新文件,make之后提示错误信息 一 .情况是这样子的,由于我前段时间把我当Ubuntu搞崩了,现在拿到的是同事给我的ubuntu还有一个sdk,新到手的sdk有一些问题,导致编译 ...

最新文章

  1. mysql创建_mysql创建新用户
  2. WCF-学习笔记概述之计算服务(1)
  3. Office Communication Server(OCS)2007 Communicator Web Access(CWA)的部署
  4. LINUX 常用命令集合
  5. Maven 创建、测试工程
  6. 中国企业500强完整榜单,请为自己和孩子收藏
  7. Unix原理与应用学习笔记----第四章 文件系统2
  8. 如何修改音乐的匹配字数
  9. 对象当前正在其他地方使用_2019 为什么我们还会继续使用 PHP ?
  10. python工程师工资多少-不止 20K,Python 工程师的薪资再度飙升!
  11. Spark源码系列(二)RDD详解
  12. 微信小程序开发--【APP(Object)函数介绍】(三)
  13. 【Selenium】1.介绍 Selenium
  14. 单体民宿小程序开发运营方案
  15. 基于Edge插件+格式工厂下载B站上的喜欢视频
  16. 小白也能看懂的零知识证明与zk-SNARKs
  17. 羽毛球社团php,羽毛球兴趣小组计划
  18. 科研教育「双目视觉技术」首选!维视MV-VS220双目立体视觉系统开发平台
  19. Jenkins升级大坑-插件问题
  20. string字符串输入

热门文章

  1. 华为Android10怎样root,华为手机怎么root?详细的root教程在此
  2. 硅云服务器怎么建网站,硅云怎么样,硅云香港云服务器怎么样
  3. 安卓app开发菜鸟教程!淘汰了80%的Android面试者,满满干货指导
  4. 20220408-CH9121串口转以太网模块学习
  5. nRF 扫描条件过滤做法
  6. nRF52832 BLE UART
  7. vue-router 如何在新窗口打开页面
  8. 上海东方美谷JW万豪、福清喜来登、宁波杭州湾凯悦等酒店开业 | 中国酒店周刊...
  9. “正话反说”:A和B在玩一个游戏,两人轮流说一句话,这句话正读反读都一样,如adgda,谁先说错,谁出局,另一个人胜出。编写一个函数用于判断这句话是否符合要求,符合要求时,函数返回1,否则函数返回0
  10. java 微信 jar_weixin-java-tools