I am trying to build a plain c++ qmake project in Qt, I have linked the library required by my code using the built in "add library..." wizard. I have set the library as static.
This then modifies my .pro file with this additional text:
win32: LIBS += -L$$PWD/./ -lfusionTrack32
INCLUDEPATH += $$PWD/.
DEPENDPATH += $$PWD/.
win32:!win32-g++: PRE_TARGETDEPS += $$PWD/./fusionTrack32.lib
else:win32-g++: PRE_TARGETDEPS += $$PWD/./libfusionTrack32.a
I then try to build the project and this error is returned:
mingw32-make[1]: *** No rule to make target'//icnas1.cc.ic.ac.uk/hd1714/ftk_basic/./libfusionTrack32.a', needed by 'release\ftk_basic.exe'. Stop.
Makefile:34: recipe for target 'release' failed
mingw32-make: *** [release] Error 2
I have am trying to add the 32bit library but I get the same error when trying to link the 64 library as well. The library is a .lib import library. I currently have all the files on the same folder. I using windows 7, minGW 32, g++.
also if I delete the line for the .a file ( that I don't not want ):
else:win32-g++: PRE_TARGETDEPS += $$PWD/./libfusionTrack32.a
then instead I get the two errors:
cannot find -lfusionTrack32
error: ld returned 1 exit status
Any help is much appreciated.