Achint
Achint

Reputation: 817

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've installed and reinstalled yacc, what could the problem be?

Upvotes: 0

Views: 156

Answers (1)

UnixShadow
UnixShadow

Reputation: 1244

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/

Upvotes: 1

Related Questions