Код: Выделить всё
compile: scanner.o listing.o
g++ -o compile scanner.o listing.o
scanner.o: scanner.c listing.h tokens.h
g++ -c scanner.c
scanner.c: scanner.l
flex scanner.l
mv lex.yy.c scanner.c
listing.o: listing.cc listing.h
g++ -c listing.cc
Код: Выделить всё
jeannetteadorante@LAPTOP-CIB2C03C:~$ make
g++ -o compile scanner.o listing.o
/usr/bin/ld:listing.o: file format not recognized; treating as linker script
/usr/bin/ld:listing.o:5: syntax error
`collect2: error: ld returned 1 exit status
make: *** [makefile:2: compile] Error 1
jeannetteadorante@LAPTOP-CIB2C03C:~$
Подробнее здесь: https://stackoverflow.com/questions/793 ... to-compile