2

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

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.

-Thanks

Peeyush Chandel(INDIA)

Mitch Dempsey
  • 38,725
  • 6
  • 68
  • 74
CuriousCase
  • 745
  • 2
  • 9
  • 22
  • 4
    When you use "-l", it automatically prefixes library names with "lib". So use -lbeststring -lbestbase etc instead – p00ya Jun 01 '10 at 04:16

1 Answers1

7

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.

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.

Mark B
  • 95,107
  • 10
  • 109
  • 188