Summary: 举个例子 在Project.pro里: QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = ADS1232 TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp HEADERS += mainwindow.h \ ControlSPI.h FORMS += mainwindow.ui #load lib : #way 1 (external lib @Qt5.9.6) LIBS += $$PWD/lib/windows/32bit/ -lGinkgo_Driver #LIBS += $$PWD/lib/windows/64bit/ -lGinkgo_Driver #Qt5.9.6 support Ginkgo_Driver.lib way 2 (external lib @Qt5.9.6) win32: LIBS += -L$$PWD/lib/windows/32bit/ -lGinkgo_Driver # INCLUDEPATH += $$PWD/lib/windows/32bit # DEPENDPATH += $$PWD/lib/windows/32bit #(Qt5.9.6 support Ginkgo_Driver.lib)
Way 3 (@Qt5.12.0) LIBS += -L./lib/windows/64bit -lGinkgo_Driver (64bit后无斜线) (Qt5.12.0: support Ginkgo_Driver.a ,copy Ginkgo_Driver.lib 为 Ginkgo_Driver.a即可) 注意: 在project.pro里,不同的QT版本,有空格,斜线,这些都有不同。 图示参见: http://www.viewtool.com/bbs/forum.php?mod=viewthread&tid=66847&extra= |