0
我sample.c文件的程序:C程序都沒有在我的linux卡利編譯
#include <stdio.h>
int main()
{
printf(「Hello World!\n」);
return 0;
}
,所以當我想編譯它我看到這個錯誤:
[email protected]:~/Desktop# x86_64-w64-mingw32-gcc sample.c -o file.exe
sample.c: In function ‘main’:
sample.c:5:2: error: stray ‘\342’ in program
sample.c:5:2: error: stray ‘\200’ in program
sample.c:5:2: error: stray ‘\234’ in program
sample.c:5:12: error: ‘Hello’ undeclared (first use in this function)
sample.c:5:12: note: each undeclared identifier is reported only once for each function it appears in
sample.c:5:18: error: expected ‘)’ before ‘World’
sample.c:5:18: error: stray ‘\’ in program
sample.c:5:18: error: stray ‘\342’ in program
sample.c:5:18: error: stray ‘\200’ in program
sample.c:5:18: error: stray ‘\235’ in program
我不能編譯任何C格式文件。請幫幫我。
file.exe?在Linux?真? – 2015-04-02 21:07:03
是兄弟,你可以編譯到另一個在linux平臺 – 2015-04-02 21:07:53
它那些討厭的聰明語錄'「Hello World!\ n」'。使用普通引號'''。 – chux 2015-04-02 21:08:53