[Debug]SpaceVim中neomake报错 Error while trying to load a compilation database
回家装上archlinux,突发奇想装个SpaceVim写题
安装配置一路可以说是没有太大问题
最后在写题时出现如下问题
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "poj-1458.cpp"
No compilation database found in /home/tanglizi/Code/acm/summerTraining/2018 or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.
查了查google,发现这是clang-check的问题,clang-check需要一个compile_commands.json文件(可由cmake生成)做到工程化check
那么问题迎刃而解
方法一
卸载clang,换上gcc
绝对暴力的方法,可以说很不优雅了
方法二
手写compile_commands.json文件,或者cmake一个工程
但是对ACM刷题党来讲,这个实在不方便
方法三
瞬间抛弃了前两个方法,于是开始修改vim插件
还是查了查google,发现问题在于一个名叫neomake插件
于是查找有关clang-check的文件,看看是怎么调用clang-check的
grep clang-check -R ~/.cache/vimfiles/repos/github.com
# /home/tanglizi/.cache/vimfiles/repos/github.com/neomake/neomake/autoload/neomake/makers/ft/c.vim: " 'exe': 'clang-check'
vim /home/tanglizi/.cache/vimfiles/repos/github.com/neomake/neomake/autoload/neomake/makers/ft/c.vim
可以看到第32行出现clang-check
function! neomake#makers#ft#c#clangcheck() abort
return {
\ 'exe': 'clang-check',
\ 'args': ['%:p'],
\ 'errorformat':
\ '%-G%f:%s:,' .
\ '%f:%l:%c: %trror: %m,' .
\ '%f:%l:%c: %tarning: %m,' .
\ '%I%f:%l:%c: note: %m,' .
\ '%f:%l:%c: %m,'.
\ '%f:%l: %trror: %m,'.
\ '%f:%l: %tarning: %m,'.
\ '%I%f:%l: note: %m,'.
\ '%f:%l: %m',
\ }
endfunction
于是在33行的args里面加上'--',同理处理clang-tidy(75行),就搞定了
\ 'args': ['%:p', '--'],
思路是在原命令后加上'--',clang就不查找compilation database了
clang-check file.cpp --
[Debug]SpaceVim中neomake报错 Error while trying to load a compilation database的更多相关文章
- 安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决
在androidstuio中运行我的未完项目,报错: Error:Execution failed for task ':app:transformClassesWithDexForDebug'.&g ...
- node 中 npm报错 Error: ENOENT, stat 'C:\Users\Administrator\AppData\Roaming\npm'
今天在看node书本时,安装express,看看里面的包.没想到出现这样一种情况. 报错了.后来思考了一下,可能是修改了node的默认安装路径.于是准备在出错的路径下建一个npm文件夹. 注意,有个时 ...
- Zabbix导入MySQL数据库报错ERROR 1046 (3D000) at line 1: No database selected
使用如下命令导入Zabbix数据库时报错 解决办法: 1.先把原始的数据库压缩包备份 cd /usr/share/doc/zabbix-server-mysql-4.0.7/ cp create.sq ...
- debug运行java程序报错
debug运行java程序报错 ERROR: transport error 202: connect failed: Connection timed out ERROR: JDWP Transpo ...
- springboot启动报错,Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
报错: Error starting ApplicationContext. To display the conditions report re-run your application with ...
- linux使用wkhtmltopdf报错error while loading shared libraries:
官网提示 linux需要这些动态库.depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender) 在li ...
- 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...
- mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
1. 问题背景 InnoDB是新版MySQL(v5.5及以后)默认的存储引擎,之前版本的默认引擎为MyISAM,因此,低于5.5版本的mysql配置文件.my.cnf中,关于InnoD ...
- wince6.0 编译报错:"error C2220: warning treated as error - no 'object' file generated"的解决办法
内容提要:wince6.0编译报错:"error C2220: warning treated as error - no 'object' file generated" 原因是 ...
随机推荐
- Kattis - How Many Digits?
How Many Digits? Often times it is sufficient to know the rough size of a number, rather than its ex ...
- XML教程!
什么是XML? XML是指可扩展标记语言(eXtensible Markup Language),它是一种标记语言,很类似HTML.它被设计的宗旨是传输数据,而非显示数据.XML标签没有被预定义,需要 ...
- 【Jim】I am back (ง •_•)ง
其实上周就来考过一次试了,真是啥都忘了 (´ー∀ー`) 下午在写[树网的核],写了一半去吃饭,回来时发现高二机房的门被锁上了,于是他们都被堵在门口. 我就回到我的地方接着写码. 听到外面有个高二的妹子 ...
- CF739E Gosha is hunting(费用流,期望)
根据期望的线性性答案就是捕捉每一只精灵的概率之和. 捕捉一只精灵的方案如下: 1.使用一个\(A\)精灵球,贡献为\(A[i]\) 2.使用一个\(B\)精灵球,贡献为\(B[i]\) 3.使用一个\ ...
- [剑指offer] 8+9. 跳台阶+变态跳台阶 (递归 时间复杂度)
跳台阶是斐波那契数列的一个典型应用,其思路如下: # -*- coding:utf-8 -*- class Solution: def __init__(self): self.value=[0]*5 ...
- jpa自定义条件分页查询
主要依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sp ...
- java源码之HashSet
1,HashSet介绍 1)HashSet 是一个没有重复元素的集合.2)它是由HashMap实现的,不保证元素的顺序,而且HashSet允许使用 null 元素.3)HashSet是非同步的.如果多 ...
- 洛谷——P3258 [JLOI2014]松鼠的新家
https://www.luogu.org/problem/show?pid=3258 题目描述 松鼠的新家是一棵树,前几天刚刚装修了新家,新家有n个房间,并且有n-1根树枝连接,每个房间都可以相互到 ...
- 日志工具全面理解及配置应用---以Log4j例子
一.日志系统基本常识 1.日志系统作用:将日志信息输出到控制台和文本文件,以追踪代码运行信息. 2.日志系统操作的是什么?日志系统打印信息,也是调用日志系统的log.Info(),log.Warn() ...
- 一起talk C栗子吧(第一百一十二回:C语言实例--线程同步概述)
各位看官们,大家好.上一回中咱们说的是线程间通信的样例,这一回咱们说的样例是:线程同步.闲话休提,言归正转.让我们一起talk C栗子吧! 看官们,提到同步.我想大家都不陌生,由于我们在前面章回中介绍 ...