开发者

compilation programming using yacc

开发者 https://www.devze.com 2023-02-26 18:22 出处:网络
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.

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消