1、将工程从动态库变为命令行程序:修改pro文件、删除文件witmotiondll_global.h;
2、继承串口基类SerialPortBase实现串口类QtSerialport; 3、写维特惯导设置示例程序main.cpp;
This commit is contained in:
@ -1,16 +1,21 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2022-05-25T15:16:09
|
||||
#
|
||||
#-------------------------------------------------
|
||||
QT += core
|
||||
QT -= gui
|
||||
QT += serialport
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
TARGET = witmotionDll
|
||||
TEMPLATE = lib
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
DEFINES += WITMOTIONDLL_LIBRARY
|
||||
TEMPLATE = app
|
||||
|
||||
SOURCES += main.cpp \
|
||||
witmotiondll.cpp \
|
||||
qtserialport.cpp
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which as been marked as deprecated (the exact warnings
|
||||
# any feature of Qt which as been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
@ -20,16 +25,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
witmotiondll.cpp
|
||||
|
||||
HEADERS += \
|
||||
witmotiondll.h \
|
||||
witmotiondll_global.h \
|
||||
register.h \
|
||||
serialportbase.h \
|
||||
register.h
|
||||
|
||||
unix {
|
||||
target.path = /usr/lib
|
||||
INSTALLS += target
|
||||
}
|
||||
witmotiondll.h \
|
||||
qtserialport.h
|
||||
|
Reference in New Issue
Block a user