How to add external libraries to qt4 application c++

╄→гoц情女王★ 提交于 2019-11-30 08:56:06
Sebastian Dusza

If you're using the GCC compiler add something like this to the .pro file:

For Boost:

INCLUDEPATH += d:/Biblioteki/C++/boost/boost_1_44_0a
LIBPATH     += d:/Biblioteki/C++/boost/boost_1_44_0a/stage/lib
LIBS        += -lboost_system-mgw44-mt-d-1_44
LIBS        += -lboost_filesystem-mgw44-mt-d-1_44
LIBS        += -lboost_date_time-mgw44-mt-d-1_44

For Poco:

INCLUDEPATH += d:/Biblioteki/C++/Poco/poco-1.3.6p2-mingw-qt2/include
LIBPATH     += d:/Biblioteki/C++/Poco/poco-1.3.6p2-mingw-qt2/lib
LIBS        += -lPocoFoundationd
LIBS        += -lPocoNetd
LIBS        += -lPocoUtild
LIBS        += -lPocoXML

INCLUDEPATH - is the location of directory with header files
LIBPATH - is the location of directory with *.a files
LIBS - contains list of libraries you want to use in your application

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