When I attempt to compile the output of this trivial lex program:
# lex.l
integer printf("found keyword INT");
using:
$ gcc lex.yy.c
I get:
Undefined symbols:
"_yywrap", referenced from:
_yylex in ccMsRtp7.o
_input in ccMsRtp7.o
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
lex --version tells me I'm actually using 'flex 2.5.35' although ls -fla `which lex` isn't a symlink. Any ideas why the output won't compile?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…