c++ Using PortAudio in Windows with Qt

我的未来我决定 提交于 2019-12-08 13:48:37

问题


I have managed to compile PortAudio on windows using MSYS. this process has created 2 files: libportaudio-2.dll and libportaudio.dll.a

Now i want to link the libraries in QtCreator, but i can not since it requires a .lib file.

If anybody have experience of compiling and using libraries with MSYS under windows, your input is appreciated.

(Note: they are compiled using MindGW compiler. I dont want to compile it with Microsoft Visual Studio, since then i will have to compile QT)


回答1:


to solve your problem is very simple. Here I report an example of a file. pros who need to use:

QT       += core
QT       -= gui
TARGET = mioTestAudio
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app

LIBS += -lportaudio.dll   <-------- this is the part you are interested

SOURCES += main.cpp


来源:https://stackoverflow.com/questions/9284944/c-using-portaudio-in-windows-with-qt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!