在C中进行编程时的Flymake配置错误 [英] Flymake configuration error while programming in C

查看:152
本文介绍了在C中进行编程时的Flymake配置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  Flymake:运行时发生配置错误(make -s -C ./CHK_SOURCES=helloworld_flymake.c SYNTAX_CHECK_MODE = 1检查语法)。 Flymake将被关闭

我正在一个名为helloworld.c的缓冲区中调用命令:

  #include< stdio.h> 

int main(void){
printf(Hello World);
return 0;
}

在同一目录中有一个名为Makefile的文件:

  helloworld:helloworld.c 
gcc helloworld.c -o helloworld

我在Ubuntu 9.04下运行GNU Emacs 23.0.91.1。



提前感谢!

解决方案

Makefile必须包含 check-syntax'target。附加到Makefile:

 检查语法:
gcc -o nul -S $ {CHK_SOURCES}

确保使用TAB启动第二行。还有一个与flymake的错误,使您必须以大写M命名Makefile。如果您说,称为makefile,它将无法正常工作。请注意!


When trying to run M-x Flymake-Mode in Emacs I get:

Flymake: Configuration error has occured while running (make -s -C ./CHK_SOURCES=helloworld_flymake.c SYNTAX_CHECK_MODE=1 check-syntax). Flymake will be switched OFF

I am invoking the command in a buffer called helloworld.c:

#include <stdio.h>

int main(void) {
  printf("Hello World");
  return 0;
}

And have a file called Makefile in the same directory:

helloworld: helloworld.c
 gcc helloworld.c -o helloworld

I'm running GNU Emacs 23.0.91.1 under Ubuntu 9.04.

Thanks in advance!

解决方案

Makefile' must contain thecheck-syntax' target. Append this to the Makefile:

check-syntax:
     gcc -o nul -S ${CHK_SOURCES}

Make sure you use a TAB to start the second line. Also there is a bug with flymake that makes you have to name the Makefile with a capital M. It won't work if you, say, call it "makefile." Watch out for that!

这篇关于在C中进行编程时的Flymake配置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆