1

我试图通过在编译portaudio后将“libportaudio.a”放入我的项目中来使用portaudio的静态库(通过执行“./configre && make”然后我将文件放入lib/.libs/)。

由于这是一个 qt 项目,我的 Makefile Lib 行如下所示:

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

在我的 .pro 中,我有:

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

但是当我尝试做时,结果是:

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'

在执行 ./configure 以使库可移植或只是在 Makefile 中进行更改时,有什么特别的事情要做吗?

4

1 回答 1

2

-l你不应该使用-L

-lportaudio 
于 2012-12-05T14:29:10.917 回答