如何将QT与novint falcon整合?

时间:2014-11-05 05:19:01

标签: c++ qt falcon

使用Visual Studio上的HDAL SDK集成Novint falcon。我在网上找不到任何文档来在QT上安装SDK。我试图在我的QT项目中包含HDAl库和头文件。 .pro文件看起来像这样。错误是

: - 1:错误:没有规则来制作目标' ../ imagesegment / hdl.h',需要' debug / main.o'。停止。



#-------------------------------------------------
#
# Project created by QtCreator 2014-11-04T14:24:33
#
#-------------------------------------------------

QT       += core

QT       -= gui

TARGET = imagesegment
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app


SOURCES += main.cpp \
    haptics.cpp \
    gshaptics.cpp \
    main_dx9.cpp \
    main_opengl.cpp \
    StdAfx.cpp

HEADERS += \
    hdl.h \
    hdlConstants.h \
    hdlErrors.h \
    hdlExports.h \
    hdlu.h \
    hdluExports.h \
    adll.h \
    afuncs.h \
    atypes.h \
    avars.h \
    glut.h \
    haptics.h \
    StdAfx.h \
    Widget.h


win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../Program Files/Novint/HDAL_SDK_2.1.3/lib/ -lhdl
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../Program Files/Novint/HDAL_SDK_2.1.3/lib/ -lhdld

INCLUDEPATH += $$PWD/../../../../Program Files/Novint/HDAL_SDK_2.1.3/include
DEPENDPATH += $$PWD/../../../../Program Files/Novint/HDAL_SDK_2.1.3/include




1 个答案:

答案 0 :(得分:0)

想出来。我们需要在qt网站上的qmake文档中添加头文件和库。尝试将qt保存在一个没有空格'的文件夹中。在它的路径上。



TEMPLATE = app
TARGET = cube4
QT += 3d
SOURCES = cubeview.cpp main.cpp \
    haptics.cpp
HEADERS = cubeview.h \
    haptics.h \
    src/haptics.h \
    src/adll.h \
    src/afuncs.h \
    src/atypes.h \
    src/avars.h \
    src/glut.h \
    src/StdAfx.h \
    hdl/hdl.h \
    hdl/hdlConstants.h \
    hdl/hdlErrors.h \
    hdl/hdlExports.h \
    hdlu/hdlu.h \
    hdlu/hdluExports.h
HEADERS += \
    Widget.h
RESOURCES = cube.qrc
CONFIG += exceptions

win32:LIBS += $$quote(C:/Program Files/Novint/HDAL_SDK_2.1.3/lib/hdl.lib)


INCLUDEPATH += $$quote("$$PWD/../../../../Program Files/Novint/HDAL_SDK_2.1.3/include/hdl")
INCLUDEPATH += $$quote("$$PWD/../../../../Program Files/Novint/HDAL_SDK_2.1.3/include/hdlu")
INCLUDEPATH += $$quote("$$PWD/../../../../Program Files/Novint/HDAL_SDK_2.1.3/examples/Basic/src")

win32: INCLUDEPATH +="C:/Program Files/Novint/HDAL_SDK_2.1.3/include"