Qt工程里添加库的奇怪为题
今天在.pro文件中添加了mysql的库的路径,结果出了问题,把mysql单独出来,编译是没有问题的。有问题的写法
LIBS += -lMultiWidgets INCLUDEPATH += /usr/local/include/htmlcxx/html LIBS += -L \ "/usr/local/lib" \ -lhtmlcxx INCLUDEPATH += /usr/include/mysql LIBS += -L "/usr/lib" -lmysqlclient CONFIG += debug CONFIG += qt
改写如下可以了:
INCLUDEPATH += /usr/include/mysql LIBS += -lMultiWidgets \ -lmysqlclient INCLUDEPATH += /usr/local/include/htmlcxx/html LIBS += -L \ "/usr/local/lib" \ -lhtmlcxx