PDA

View Full Version : Qt Creator How to add an external .a library in Qt Creator project via GUI?



DIMEDROLL
4th January 2012, 21:24
I've built yamlcpp static (libyaml-cpp.a) library using Qt's mingw compiler. Now I want to add it to my project. I use this qt doc (http://doc.qt.nokia.com/qtcreator-2.2/creator-project-qmake-libraries.html#to-add-libraries), but Qt Creator allows to select only *.lib files not *.a files (in Choose file dialog). That's confusing because I'm using MinGW 4.4 debug configuration, not MSVC2008.

Is it possible to add *.a libraries via Qt Creator's GUI and how do I do it?

Windows 7, Qt Creator 2.3.1, Qt 4.7.4

ChrisW67
7th January 2012, 07:11
You can't as far as I can tell. https://bugreports.qt.nokia.com/browse/QTCREATORBUG-6093

It's not that hard to type this in to the pro file:


INCLUDEPATH += C:/somelibrary/include
LIBS += -Lc:/somelibrary/lib -lname