compilation programming using yacc
So I have a yacc file which gives the required yy.tab.c when I compile it, but when I use cc or gcc to compile the output file with the library -ly, it says ly not found.
I'v开发者_高级运维e installed and reinstalled yacc, what could the problem be?
The path to liby.a could be wrong, or you do not have liby.a installed. Try locating it by executing:
$ find / -name liby.a
and then add the path to your compile statement
$ gcc *.c -ly -L/path/to/lib/
精彩评论