0
Your makefile does too much work when only cpp2html.c has been changed:
gcc -g -c cpp2html.c
gcc -g cpp2html.o lex.yy.o
gcc -g -DDEBUG cpp2html.o lex.yy.o -o cpp2html
不起作用,我試過幾乎每一個序列。我的代碼如下:A.編譯cpp2html.c生成cpp2html.o
cpp2html: cpp2html.o lex.yy.o
gcc {g cpp2html.o lex.yy.o
gcc -g -DDEBUG cpp2html.o lex.yy.o -o cpp2html
cpp2html.o: cpp2html.c
gcc -g -c cpp2html.c
lex.yy.c: cppscanner.l
flex cppscanner.l
lex.yy.o: lex.yy.c
gcc -g -c lex.yy.c
什麼是'gcc -g cpp2html.o lex.yy.o'應該做的呢? –
讓第一個gcc出來工作。非常感謝@WillBriggs – Shay