请问在vim中用编程的话,如何在vim的窗口中显示编译错误?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
abckkkk
帖子: 82
注册时间: 2007-10-09 21:54
来自: 益州

请问在vim中用编程的话,如何在vim的窗口中显示编译错误?

#1

帖子 abckkkk » 2007-10-23 20:31

偶现在用C++编辑,当编写多个.cpp文件和.h文件后,在终端用make编译,显示若干行出错信息。比如:

/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
denmat.cpp: In constructor ‘DenMat::DenMat(Super&, Sub&)’:
denmat.cpp:14: error: ‘trace’ was not declared in this scope
denmat.cpp:16: error: ‘DIM’ was not declared in this scope
denmat.cpp:18: error: ‘Create_aa’ was not declared in this scope
denmat.cpp:20: error: ‘Jacobi_Dia’ was not declared in this scope
denmat.cpp:26: error: a function-definition is not allowed here before ‘{’ token
denmat.cpp:29: error: expected ‘,’ or ‘...’ before ‘*’ token
denmat.cpp:29: error: a function-definition is not allowed here before ‘{’ token
denmat.cpp:31: error: expected `}' at end of input

有没有什么办法让这些错误在我打开的denmat.cpp中窗口下方显示呢?
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#2

帖子 xhy » 2007-10-24 6:47

写一个makefile
然后 :make
目前负债150多万
回复