Question

I'm trying to use the static library from portaudio by putting "libportaudio.a" in my project after compiling portaudio (by doing "./configre && make" and then i took the file in lib/.libs/).

As this is a qt project, my Makefile Lib line look like this:

LIBS          = $(SUBLIBS)  -L/usr/lib/x86_64-linux-gnu -L/home/larose/babel/BabelAudio/lib -Lportaudio -Llibspeex -Llibspeexdsp -lQtGui -lQtNetwork -lQtCore -lpthread

In my .pro i have :

LIBS += -L$$PWD/lib -Lportaudio -Llibspeex -Llibspeexdsp

But when i try doing make, the result is :

SpeakThread.cpp:(.text+0x388): undefined reference to `Pa_OpenStream'
SpeakThread.cpp:(.text+0x3c7): undefined reference to `Pa_OpenStream'
SpeakThread.cpp:(.text+0x3d0): undefined reference to `Pa_StartStream'
SpeakThread.cpp:(.text+0x3da): undefined reference to `Pa_StartStream'
SpeakThread.cpp:(.text+0x3e4): undefined reference to `Pa_IsStreamActive'

Is there anything special to do when doing ./configure to make the library portable, or simply something to change in the Makefile ?

Était-ce utile?

La solution

you should use -l not -L

-lportaudio 
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top