本文介绍了找不到-ly错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试运行lexx和yacc程序,但出现以下错误:
I am trying to run a lexx and yacc program and I got the following error:
/usr/bin/ld: cannot find -ly
collect2: error: ld returned 1 exit status
请告诉我应该添加哪些库?
Plz tell me which libraries am I supposed to add?
推荐答案
我猜问题是,您使用的是yacc版本,而不是旧的AT& T yacc版本,该版本不带有liby(-ly
您有).因此,您需要从命令行中删除-ly
选项,并提供自己的main
和yyerror
实现.
I would guess the problem is that you're using a version of yacc other than the old AT&T yacc which doesn't come with liby (the -ly
you have). So you need to remove the -ly
option from your command line, and provide your own implementations of main
and yyerror
.
这篇关于找不到-ly错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!