0
私は初めて忍者を使ってプログラムをビルドしています。私はcmdから 'ninja -f hello.c'コマンドを実行しますが、エラー "ninja:error:hello.c:1:lexing error"が表示されます。なぜこれが起こっているのですか?ここに私のbuild.ninjaファイルは次のとおりです。忍者で字句エラーがどういう意味ですか?
# 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型のmain()'問題を解決していない – user657267
。 –