当前位置: 首页 > article >正文

问题分析4

问题分析 4

CMake-tools 不能正常工作【已解决】

[main] 正在配置项目: CppLearn 
[proc] 执行命令: /usr/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -C /home/pomegranate/workspace/CppLearn -S/home/pomegranate/workspace/CppLearn -B/home/pomegranate/workspace/CppLearn/build
[cmake] Not searching for unused variables given on the command line.
[cmake] loading initial cache file /home/pomegranate/workspace/CppLearn
[cmake] CMake Error: Error processing file: /home/pomegranate/workspace/CppLearn
[cmake] -- SOURCES: /home/pomegranate/workspace/CppLearn/practice/chapter12/a.cpp;/home/pomegranate/workspace/CppLearn/practice/chapter12/main.cpp
[cmake] -- HEADERS: /home/pomegranate/workspace/CppLearn/practice/chapter12;thirdpaties/Plog/include
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "/home/pomegranate/workspace/CppLearn/build/CMakeFiles/CMakeOutput.log".
[proc] 命令“/usr/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -C /home/pomegranate/workspace/CppLearn -S/home/pomegranate/workspace/CppLearn -B/home/pomegranate/workspace/CppLearn/build”已退出,代码为 1

问题猜想:/usr/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -C /home/pomegranate/workspace/CppLearn -S/home/pomegranate/workspace/CppLearn -B/home/pomegranate/workspace/CppLearn/build 命令有误【确凿】

验证:命令行运行该命令

Not searching for unused variables given on the command line.
loading initial cache file /home/pomegranate/workspace/CppLearn
CMake Error: Error processing file: /home/pomegranate/workspace/CppLearn
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- SOURCES: /home/pomegranate/workspace/CppLearn/practice/chapter12/a.cpp;/home/pomegranate/workspace/CppLearn/practice/chapter12/main.cpp
-- HEADERS: /home/pomegranate/workspace/CppLearn/practice/chapter12;thirdpaties/Plog/include
-- Configuring incomplete, errors occurred!
See also "/home/pomegranate/workspace/CppLearn/build/CMakeFiles/CMakeOutput.log".

问题猜想:-C XXX 选项有误【确凿】

验证:删除 -C 重新允许命令

Not searching for unused variables given on the command line.
-- SOURCES: /home/pomegranate/workspace/CppLearn/practice/chapter12/a.cpp;/home/pomegranate/workspace/CppLearn/practice/chapter12/main.cpp
-- HEADERS: /home/pomegranate/workspace/CppLearn/practice/chapter12;thirdpaties/Plog/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pomegranate/workspace/CppLearn/build

解决方法:配置 cmake-tools 插件的行为,排查全局 settings.json【有效】

"cmake.cacheInit": "" // 发现官方脚本 Bug

删除即可

原文地址:https://blog.csdn.net/2303_78834656/article/details/146531474
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.kler.cn/a/612410.html

相关文章:

  • 数据结构与算法:双向广搜
  • 第六届 蓝桥杯 嵌入式 省赛
  • ​​SenseGlove与Aeon Robotics携手推出HEART项目,助力机器人培训迈向新台阶
  • uniapp自定义目录tree(支持多选、单选、父子联动、全选、取消、目录树过滤、异步懒加载节点、v-model)vue版本
  • 免费使用!OpenAI 全量开放 GPT-4o 图像生成能力!
  • QT记事本
  • RISC-V AIA学习3---APLIC 第二部分(APLIC 中断域的内存映射控制区域)
  • 【软测】AI助力测试用例
  • 快速入手-基于Django-rest-framework的ModelSerializer模型序列化器(三)
  • 华为、浪潮、华三链路聚合概述
  • python使用cookie、session、selenium实现网站登录(爬取信息)
  • 用 Python 也能做微服务?
  • Vue+SpringBoot:整合JasperReport作PDF报表,并解决中文不显示问题
  • OPENCV数字识别(非手写数字/采用模板匹配)
  • jEasyUI 创建自定义视图
  • EMC知识学习二
  • 路由选型终极对决:直连/静态/动态三大类型+华为华三思科配置差异,一张表彻底讲透!
  • 【Ai】--- 可视化 DeepSeek-r1 接入 Open WebUI(超详细)
  • 论文阅读笔记——ST-4DGS,WideRange4D
  • Kafka简单的性能调优