/ usr / bin / ld:找不到-llibeststring.a [英] /usr/bin/ld: cannot find -llibeststring.a

查看:329
本文介绍了/ usr / bin / ld:找不到-llibeststring.a的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的程序中使用节日TTS c ++ API。我已从 http://www.cstr.ed.ac.uk/downloads/festival/2.0.95/
并在我的UBUNTU 10.04上成功安装festival和speech_tools

I am using festival TTS c++ API in my program.I have downloaded all files from http://www.cstr.ed.ac.uk/downloads/festival/2.0.95/ and install festival and speech_tools successfully on my UBUNTU 10.04

现在编译我的c ++程序时gcc会报错:

now when compile my c++ programme gcc gives error:

g++ -L/usr/lib -L/home/peeyush/Desktop/festival/src/lib -L/home/peeyush/Desktop/speech_tools/lib -o"peeyush" ./src/peeyush.o -llibeststring.a -llibestbase.a -llibestools.a -llibFestival.a
/usr/bin/ld: cannot find -llibeststring.a
collect2: ld returned 1 exit status
make: *** [peeyush] Error 1

因此,请协助我解决这个错误。

so please help me to sort out this error.

-Thank

Peeyush Chandel(INDIA)

Peeyush Chandel(INDIA)

推荐答案

-l <​​/ code>选项,您不指定前导 lib 或尾随 .a .so 它们由链接器假定的部分。你可以使用 -leststring 来获取它(假设你的 -L 路径设置正确。

When using the -l option, you don't specify the leading lib or trailing .a or .so parts of the name as they're assumed by the linker. You would want to use something like -leststring to pick it up (assuming that your -L path is set correctly.

或者,您可以指定确切的文件名(因此不要 -l <​​/ code>,只需 libeststring。 a )作为要链接的对象列表的一部分(确保顺序与您的.o文件相对),但我相信在这种情况下,您必须指定路径为链接器 t知道搜索你的 -L 路径。最简单是使用 -l <​​/ code>虽然。

Alternately you can specify the exact filename (so no -l, just libeststring.a) as part of the object list to link (make sure the order is right relative to your .o files), but I believe in that case you would have to specify the path as the linker won't know to search your -L path. Easiest is to use -l though.

这篇关于/ usr / bin / ld:找不到-llibeststring.a的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆