cs143
cs143 copied to clipboard
undefined reference to `yylex'
This problem is caused by c++ library virus c library. See here.
The solution is quite simple. Just link lexer with the static lc library.
Edit the Makefile where lexer is built:
LDFLAGS= -static
lexer: ${OBJS}
${CC} ${LDFLAGS} ${CFLAGS} ${OBJS} ${LIB} -o lexer
This problem is caused by c++ library virus c library. See here.
The solution is quite simple. Just link lexer with the static lc library.
Edit the
Makefilewhere lexer is built:LDFLAGS= -static lexer: ${OBJS} ${CC} ${LDFLAGS} ${CFLAGS} ${OBJS} ${LIB} -o lexer
thx! it works for me