Friday, 15 February 2013

c - arm-linux-gnuueabi-gcc cannot find libraries install to custom directory -



c - arm-linux-gnuueabi-gcc cannot find libraries install to custom directory -

i installed 2 libraries, sphinxbase , pocketsphinx, /home/phil/sphinx. i'm compiling test file uses these 2 libraries using line:

arm-linux-gnueabi-gcc --verbose -o sphinx_test sphinx_test.c \ -dmodeldir=\"`pkg-config --variable=modeldir pocketsphinx`\" \ `pkg-config --cflags --libs pocketsphinx sphinxbase`

however error compile failure:

/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lpocketsphinx /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lsphinxbase /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lsphinxad collect2: error: ld returned 1 exit status

i'd appreciate help trying tell gcc library files.

the error message indicates there's lack of -l parameter in expanded gcc command statement. if you'd stick pkg-config, need check corresponding .pc file see if settings correct. otherwise, might add together -l/home/phil/sphinx/libs gcc command statement see if libs work (where /home/phil/sphinx/libs .so files located , might different in system).

c gcc

No comments:

Post a Comment