0

I need your help about this problem if anyone has info.

I have configured speex1.2rc1 for xscale-elf (ARM architecture) ,then executed make and make install. So, I obtained libspeex.a in the /usr/local/lib with libogg.a compiled as well. but i when i link the library to my program (by adding LDFLAGS += -lspeex -lm), and try to compile, i get this error:

/usr/lib/gcc/xscale-elf/3.4.3/../../../../xscale-elf/bin/ld: cannot find -lspeex
collect2: ld returned 1 exit status
make: *** [exe0] Error 1

I passed ./configure options as :

./configure --host=xscale-elf

It's likely that the linker can't see libspeex.a, and I also tried the line LDFLAGS += /usr/local/lib/libspeex.a -lm in Makefile but got another error(also in linking):

/tmp/ccvi7Pns.o(.text+0x179c): In function `main':
: undefined reference to `BlinkC$speex_bits_init'
collect2: ld returned 1 exit status
make: *** [exe0] Error 1
Employed Russian
  • 199,314
  • 34
  • 295
  • 362

1 Answers1

0
./configure --host=xscale-elf

You didn't tell what host you are compiling this on, but given the path to your ld, it appears that you are cross-compiling. If so, your host is likely not xscale-elf (but probably i686-linux-gnu or some such).

You need to understand the difference between host and target, and rebuild your speex1 (whatever that is) using appropriate compiler and --target=xscale-elf.

Also, installing libraries intended for taget into /usr/local/lib is the wrong thing to do.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362