Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.1.2
-
None
-
Windows 7, Mingw, QtCreator 3.1.2, QT5.2.1
-
9109dd465b7fcdad822a0be804d63446f76c398a
Description
Related to issue QTCREATORBUG-10423.
Using mingw.
I wish to add an existing library to my project. I select the .lib through the "Add Library" dialogue. I choose the "External Library" choice, select the library file and include path. I uncheck "Linux" and "Mac", check "Static" and uncheck the three "Windows" options.
The following entries are added to my .pro file:
win32: LIBS += -L$$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis/ -lpelletAnalysis
INCLUDEPATH += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis
DEPENDPATH += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis
win32:!win32-g++ PRE_TARGETDEPS += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis/pelletAnalysis.lib
else:win32-g++: PRE_TARGETDEPS += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis/libpelletAnalysis.a
Note the missing semi-colon after the g++ in the second last line. The project fails to build with error:
Assignment needs exactly one word on the left hand side.
It should read:
win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis/pelletAnalysis.lib