Novint falcon is integrated using the HDAL SDK on Visual Studio. I could not find any documentation online to install the SDK on QT. I tried to include the HDAl library and header files in my QT project. The .pro file looks like this.The error is
:-1: error: No rule to make target '../imagesegment/hdl.h', needed by 'debug/main.o'. Stop.
#-------------------------------------------------
#
# 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
Figured it out. We need to add the header files and libs as mentioned in the qmake documentation on qt website. Try to save qt in a folder with 'no spaces' in it's path.
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"
Related
I am using Qt Creator, Qt6, C++ for my program.
I would like to use the PoDoFo library but I have no knowledge of how to add the library/headers so that I can use it in my project and build it.
I have downloaded the PoDoFo code, just can't find any guidance/tutorials on how to add PoDoFo specifically in Qt Creator.
Edit: I tried "Add Library" to my project and used external library option. Once I finish, I try to compile my code and I get an error "podofo-0.9.7\COPYING.LIB:-1: error: LNK1107: invalid or corrupt file: cannot read at 0x62DC"
I can include the podofo.h file but that will also throw this error:"podofo-0.9.7\src\podofo\base\PdfCompilerCompat.h:44: error: C1083: Cannot open include file: 'podofo_config.h': No such file or directory"
.pro file:
QT += core gui sql printsupport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
#QMAKE_CXXFLAGS += -std=c++17
SOURCES += \
addbookdialog.cpp \
addbooksdialog.cpp \
bookdetailswindow.cpp \
bulkdetailsdialog.cpp \
cleanebooksdialog.cpp \
insertlinkdialog.cpp \
inserttabledialog.cpp \
linkcollectiondialog.cpp \
linkmanagerwindow.cpp \
main.cpp \
mainwindow.cpp \
searchnamedialog.cpp \
summarywindow.cpp
HEADERS += \
addbookdialog.h \
addbooksdialog.h \
bookdetailswindow.h \
bulkdetailsdialog.h \
cleanebooksdialog.h \
common.h \
insertlinkdialog.h \
inserttabledialog.h \
linkcollectiondialog.h \
linkmanagerwindow.h \
mainwindow.h \
queries.h \
searchnamedialog.h \
summarywindow.h
FORMS += \
addbookdialog.ui \
addbooksdialog.ui \
bookdetailswindow.ui \
bulkdetailsdialog.ui \
cleanebooksdialog.ui \
insertlinkdialog.ui \
inserttabledialog.ui \
linkcollectiondialog.ui \
linkmanagerwindow.ui \
mainwindow.ui \
searchnamedialog.ui \
summarywindow.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
DISTFILES += \
style.qss
RESOURCES += \
images.qrc \
style.qrc
unix|win32: LIBS += -L$$PWD/3rdparty/podofo-0.9.7/ -lCOPYING
INCLUDEPATH += $$PWD/3rdparty/podofo-0.9.7/src/podofo
DEPENDPATH += $$PWD/3rdparty/podofo-0.9.7/src/podofo
qt creator add library dialog:
Did you take a look on this link: https://doc.qt.io/qt-5/third-party-libraries.html?
I just followed it and my 3rdParty library (https://github.com/cutelyst/simple-mail) was linked and accessible from my application C++.
Basically, your .pro file will look like this after setting everything properly:
TARGET = MyQtApp
TEMPLATE = app
INCLUDEPATH += 3rdparty/CatWhisperer/include
SOURCES += src/main.cpp
LIBS += -L"3rdparty/CatWhisperer/lib" -lCatWhisperer
I use Qt 4.10.0 in windows 7.
When I tried to compile my project, error occurs:
:-1: error: LNK1104: cannot open file 'libboost_date_time-vc141-mt-x64-1_71.lib'
-------------------------------------------------
#
# Project created by QtCreator 2015-12-23T11:43:59
#
#-------------------------------------------------
QT += core gui
QT += serialport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = MDT
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
checkboxheader.cpp \
ft_file_info.cpp \
ui_dll_function.cpp \
ui_utility.cpp \
startprocess.cpp \
qmdttimer.cpp \
usbswitch.cpp
HEADERS += mainwindow.h \
checkboxheader.h \
ft_file_info.h \
ui_dll_function.h \
ui_utility.h \
startprocess.h \
qmdttimer.h \
QMtrace.h \
usbswitch.h
FORMS += mainwindow.ui
INCLUDEPATH += ./DownloadLib
LIBS += -LD:\EPS_projects\2018to2019\29_IOT_MDI\IoT_MDT_official\lib -
lDownloadLib \
QMTRACE.lib \
EfuseLibrary.lib \ -
LD:\EPS_projects\2018to2019\29_IOT_MDI\IoT_MDT_official\boost_1_71_0\libs \
RESOURCES += \
icons.qrc
#LIBS += -L$$PWD/lib/ -lQMTRACE / -lEfuseLibrary
#INCLUDEPATH += $$PWD/.
#DEPENDPATH += $$PWD/.
LIBS += -L$$PWD/lib/ -lEfuseLibrary
#win32: LIBS += -L$$PWD/lib/ -lEfuseLibrary
#win32: LIBS += -L$$PWD/lib/ -lusb_relay_device
INCLUDEPATH += $$PWD/DownloadLib
I use boost boost_1_71_0 in my project.
Am trying to build the project found # uconfig
, the project requires poppler and the author provided pre-built links
headers and DLLS
I have downloaded them and this is structure of the project
dll folder contains all the DLLS and poppler contains header files,
the pdf_extract.pro has the following content
QT += core gui widgets xml
TARGET = pdf_extract
TEMPLATE = lib
DEFINES += DATASHEET_EXTRACTOR_EXPORT_LIB
DESTDIR = "$$PWD/../../bin"
CONFIG(release, debug|release) {
CONFIG += optimize_full
}
SOURCES += \
$$PWD/datasheet.cpp \
$$PWD/datasheetpackage.cpp \
$$PWD/datasheetpin.cpp \
$$PWD/datasheetbox.cpp \
$$PWD/pdfdebugwidget/pdfdebugwidget.cpp \
$$PWD/pdfdebugwidget/pdfdebugviewer.cpp \
$$PWD/pdfdebugwidget/pdfdebugscene.cpp \
$$PWD/pdfdebugwidget/pdfdebugitempage.cpp \
$$PWD/pdfdebugwidget/pdfdebugitempin.cpp \
$$PWD/pdfdebugwidget/pdfdebugitemtextbox.cpp \
$$PWD/model/pdfdatasheet.cpp \
$$PWD/model/pdfpage.cpp \
$$PWD/model/pdftextbox.cpp \
$$PWD/model/pdfpin.cpp \
$$PWD/model/pdfcomponent.cpp \
$$PWD/controller/pdfloader.cpp
HEADERS += \
$$PWD/pdf_extract_common.h \
$$PWD/datasheet.h \
$$PWD/datasheetpackage.h \
$$PWD/datasheetpin.h \
$$PWD/datasheetbox.h \
$$PWD/pdfdebugwidget/pdfdebugwidget.h \
$$PWD/pdfdebugwidget/pdfdebugviewer.h \
$$PWD/pdfdebugwidget/pdfdebugscene.h \
$$PWD/pdfdebugwidget/pdfdebugitempage.h \
$$PWD/pdfdebugwidget/pdfdebugitempin.h \
$$PWD/pdfdebugwidget/pdfdebugitemtextbox.h \
$$PWD/model/pdfdatasheet.h \
$$PWD/model/pdfpage.h \
$$PWD/model/pdftextbox.h \
$$PWD/model/pdfpin.h \
$$PWD/model/pdfcomponent.h \
$$PWD/controller/pdfloader.h
LIBS += -L"$$PWD/../../bin"
LIBS += -L"$$PWD/dll/jpeg62.dll"
LIBS += -L"$$PWD/dll/libfreetype-6.dll"
LIBS += -L"$$PWD/dll/libopenjp2.dll"
LIBS += -L"$$PWD/dll/libpng12.dll"
LIBS += -L"$$PWD/dll/libpoppler-80.dll"
LIBS += -L"$$PWD/dll/libpoppler-qt5.dll"
LIBS += -L"$$PWD/dll/libtiff3.dll"
LIBS += -L"$$PWD/dll/zlib1.dll"
INCLUDEPATH += $$PWD/../../
LIBS += -lkicad
macx {
LIBS += -L /usr/local/lib
INCLUDEPATH += /usr/local/include
}
yet when I try to build the project I get these errors... am not sure what am doing wrong or missing
According to qmake documentation, using unix standards to specify linked libraries will work on Windows, too. Anyway, instead of
LIBS += -L"$$PWD/dll/jpeg62.dll"
I would try
LIBS += "-L$$PWD/dll" - ljpeg62
or just use Windows style:
LIBS += $$PWD/dll/jpeg62.dll
2 years late but i've also been wondering,
#include <QLibrary>
place your *.dll in your Debug/Release folder. e.g:
build-test-Desktop_Qt_6_1_2_MinGW_64_bit-Debug/debug
now simply:
QLibrary lib("myLibrary.dll");
if (!lib.load())
qDebug() << lib.errorString();
if (lib.load())
qDebug() << "library loaded";
alternatively, rather than placing the DLL in debug folder you can set the location of the dll to
c:/path/to/dll/yourdll.dll
I'm working with an Haptic Device (" Phantom Omni"), and i'm creating a GUI, this gui has some headers and source files from the haptic device. I've already included them, but I have also include the libraries. I've tried all the several ways that I found on internet, but when I try to build the project it returns me error about LNK 2019 and LNK 2001.
I've checked also the Makefile that the qMake generates, and into this file there are the paths and libraries that i would to add, but I don't know why, I have always the some error.
The .pro file:
#LIBS += -L"C:\\Folder\\Folder2\\LibFolder" -lextlib.lib
QT += core gui
CONFIG += console
QT += gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = GUI_TeleManipulation
TEMPLATE = app
SOURCES += main.cpp\
gui_telemanipulation.cpp \
debug/moc_gui_telemanipulation.cpp \
src/Client.cpp \
src/PHANToM.cpp \
src/HDU/src/hdu.cpp \
src/HDU/src/hduAfx.cpp \
src/HDU/src/hduDecompose.cpp \
src/HDU/src/hduError.cpp \
src/HDU/src/hduHapticDevice.cpp \
src/HDU/src/hduLine.cpp \
src/HDU/src/hduLineSegment.cpp \
src/HDU/src/hduMatrix.cpp \
src/HDU/src/hduPlane.cpp \
src/HDU/src/hduQuaternion.cpp \
src/HDU/src/hduRecord.cpp \
src/hd.cpp
HEADERS += gui_telemanipulation.h \
ui_gui_telemanipulation.h \
include/Client.hpp \
include/matrix.h \
include/Packet.hpp \
include/PHANToM.h \
include/HD/hd.h \
include/HD/hdCompilerConfig.h \
include/HD/hdDefines.h \
include/HD/hdDevice.h \
include/HD/hdExport.h \
include/HD/hdScheduler.h \
include/HDU/hdu.h \
include/HDU/hduBoundBox.h \
include/HDU/hduError.h \
include/HDU/hduGenericMatrix.h \
include/HDU/hduHapticDevice.h \
include/HDU/hduLine.h \
include/HDU/hduLineSegment.h \
include/HDU/hduMath.h \
include/HDU/hduMatrix.h \
include/HDU/hduPlane.h \
include/HDU/hduQuaternion.h \
include/HDU/hduRecord.h \
include/HDU/hduVector.h \
src/HDU/src/hduAfx.h \
src/HDU/src/hduDecompose.h
FORMS += gui_telemanipulation.ui
#LIBS += -L"C:\\Folder\\Folder2\\LibFolder" -lextlib.lib
LIBS += -L"lib/" -lhd
LIBS += -L"lib/" -lhdu
With static libraries, you should be able to use simply this:
LIBS += "C:/Folder/Folder2/LibFolder/extlib.lib"
This is assuming you are doing Windows-only project. Read the docs for more.
I downloaded the libcURL source code and imported the headers and source into my .pro file and it seems to find all the libraries except for the main one.
dies on:
#include <curl/curl.h>
.pro file contains:
(this is the updated version)....................
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = RESTtest
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlMulti.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlHeader.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlVersion.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlEasy.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlShare.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlMessage.cpp \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/src/CurlHttpPost.cpp \
HEADERS += mainwindow.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlEasy.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlInterface.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlMulti.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlPair.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlVersion.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlHttpPost.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlHeader.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlShare.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlMessage.h \
../../../../../Users/Brad2/Documents/GitHub/curlcpp/include/CurlError.h \
FORMS += mainwindow.ui
win32:LIBS += -L"../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64" -lcurl
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curlcpp/include"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curlcpp/src"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curl/include"
INCLUDEPATH += "../../../../../Users/Brad2/Documents/GitHub/curl/include/curl"
OTHER_FILES += \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/curl.exe \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/libeay32.dll \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/libcurl.dll \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/ssleay32.dll \
../../../../../Users/Brad2/Documents/GitHub/curl-7.34.0-rtmp-ssh2-ssl-sspi-zlib-winidn-static-bin-w64/mk-ca-bundle.vbs
Install this:
apt-get install libcurl4-openssl-dev
apt-get install libcurl4-gnutls-devĀ