|
|
我的hello.c:
#include <stdio.h>
main()
{
printf("hello,word\n");
}
编译输入:gcc -o hello hello.c,编译提示如下:
luopeng@ubuntu:~/c$ gcc -o hell hello.c
hello.c:1: error: syntax error before "buffer"
hello.c:1:36: missing terminating ' character
hello.c:1:36: warning: character constant too long for its type
hello.c:2: error: syntax error before "you"
hello.c:2: error: syntax error before "that"
hello.c:3: error: syntax error before "enter"
hello.c:3:36: missing terminating ' character
hello.c:3:36: warning: character constant too long for its type
In file included from /usr/include/_G_config.h:44,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from hello.c:5:
/usr/include/gconv.h:72: error: syntax error before "size_t"
/usr/include/gconv.h:88: error: syntax error before "size_t"
/usr/include/gconv.h:97: error: syntax error before "size_t"
/usr/include/gconv.h:174: error: syntax error before "size_t"
/usr/include/gconv.h:177: error: syntax error before '}' token
In file included from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from hello.c:5:
/usr/include/_G_config.h:47: error: field `__cd' has incomplete type
/usr/include/_G_config.h:50: error: field `__cd' has incomplete type
In file included from /usr/include/stdio.h:72,
from hello.c:5:
/usr/include/libio.h:351: error: syntax error before "size_t"
/usr/include/libio.h:360: error: syntax error before "size_t"
/usr/include/libio.h:468: error: syntax error before "_IO_sgetn"
/usr/include/libio.h:468: error: syntax error before "size_t"
In file included from hello.c:5:
/usr/include/stdio.h:302: error: syntax error before "size_t"
/usr/include/stdio.h:309: error: syntax error before "size_t"
/usr/include/stdio.h:351: error: syntax error before "size_t"
/usr/include/stdio.h:355: error: syntax error before "size_t"
/usr/include/stdio.h:603: error: syntax error before "fread"
/usr/include/stdio.h:603: error: syntax error before "size_t"
/usr/include/stdio.h:609: error: syntax error before "fwrite"
/usr/include/stdio.h:609: error: syntax error before "size_t"
/usr/include/stdio.h:631: error: syntax error before "fread_unlocked"
/usr/include/stdio.h:631: error: syntax error before "size_t"
/usr/include/stdio.h:633: error: syntax error before "fwrite_unlocked"
/usr/include/stdio.h:633: error: syntax error before "size_t"
/usr/include/gconv.h:176: warning: array `__data' assumed to have one element
这是什么错误,是不是编程环境没有配置好? |
|