0
我正在使用忍者來首次構建一個程序。我從cmd運行命令「ninja -f hello.c」,但得到錯誤「ninja:error:hello.c:1:lexing error」。爲什麼會發生這種情況?這裏是我的build.ninja文件:lexing錯誤在忍者中意味着什麼?
# build.ninja
cc = clang
cflags = -Weverything
rule compile
command = $cc $cflags -c $in -o $out
rule link
command = $cc $in -o $out
build hello.o: compile hello.c
build hello: link hello.o
default hello
這裏是HELLO.C:
#include<stdio.h>
int main()
{
printf("Hello World");
}
'主()' - >'INT主要()' – user657267
沒有解決不了的問題。 –