当前位置: 首页 > 工具软件 > Ginkgo > 使用案例 >

QT添加Ginkgo_Driver.lib错误

汝臻
2023-12-01

1.Ginkgo_Driver.lib可以在纬图下载接口库
window下选择的库是\Ginkgo_USB-I2C&SPI&CAN_API\lib\msvc_64bit\Ginkgo_Driver.lib
2.在.pro中添加LIB

  • 情形1
LIBS += -LD:/Ginkgo/Ginkgo_USB-I2C&SPI&CAN_API/lib/msvc_64bit -lGinkgo_Driver

报错:(2319个error)

E:\QT\Qt5.13.1\5.13.1\mingw73_64\include\QtCore\qstring.h:572: error: undefined reference to `__imp__ZN7QString15fromUtf8_helperEPKci'
E:\QT\Qt5.13.1\5.13.1\mingw73_64\include\QtCore\qstring.h:483: error: undefined reference to `__imp__ZN7QString6appendERKS_'
E:\QT\Qt5.13.1\5.13.1\mingw73_64\include\QtCore\qstring.h:550: error: undefined reference to `__imp__ZN7QString13toUtf8_helperERKS_'
E:\QT\Qt5.13.1\5.13.1\mingw73_64\include\QtCore\qarraydata.h:239: error: undefined reference to `__imp__ZN10QArrayData10deallocateEPS_yy'
  • 情形2
    右键项目“添加库”,库类型选择“外部库“”,平台选择“windows”,连接选“动态”,不勾选生成debug下.d库
win32: LIBS += -L'D:/Ginkgo/Ginkgo_USB-I2C&SPI&CAN_API/lib/msvc_64bit/' -lGinkgo_Driver

INCLUDEPATH += 'D:/Ginkgo/Ginkgo_USB-I2C&SPI&CAN_API/lib/msvc_64bit'
DEPENDPATH += 'D:/Ginkgo/Ginkgo_USB-I2C&SPI&CAN_API/lib/msvc_64bit'

报错:

:-1: error: fatal error: no input files
:-1: error: fatal error: no input files
:-1: error: fatal error: no input files
:-1: error: fatal error: no input files

-情形3
复制\Ginkgo_USB-I2C&SPI&CAN_API\lib\msvc_64bit\Ginkgo_Driver.lib和Ginkgo_Driver.dll到项目工程.pro同级目录下

LIBS += -L$$PWD\.\ -lGinkgo_Driver

成功构建

 类似资料: