qt 安装cmake

 

 

1.Parse error. Expected a command name, got unquoted argument with text

https://blog.csdn.net/zou_albert/article/details/103486685

cmake 出现错误提示:

Parse error. Expected a command name, got unquoted argument with text " cmake_minimum_required".
无论CMakeList.txt的第一行指令是什么,运行cmake都这样提错。把txt文件设置为了utf-8的bom编码,修改为utf-8编码即可(对应的是第二条的理由)
CMakeLists.txt 一般有以下三种解决办法:
1、Cmake 升级;
2、utf8编码的bug: vim 打开

:set nobomb 
:wq
  • 1
  • 2

或者使用 tail 命令:

tail -c +4 old_file > new_file
  • 1

3、查看代码每行末尾是否有多余空格(复制来的代码末尾有空格);

 

 

2---没有安装libGL

https://www.cnblogs.com/ohsolong/p/10825396.html

Failed to find "GL/gl.h" in "/usr/include/libdrm"

环境qt5.12.3 deepin15.10

使用cmake构建项目时报错,网上查询了一下发现时未安装opengl,于是安装便是了

sudo apt install mesa-common-dev

问题解决

 

posted on 2020-12-21 09:24  心中日月007  阅读(840)  评论(0)    收藏  举报