Unsolved QtLeapMotion Library not building
-
Hello ,
I am facing issue building QtLeapMotionLibrary.
I am building using below configuration.TEMPLATE = lib
TARGET = QtLeapMotion
DEFINES += QTLEAPMOTION_LIBRARY
CONFIG += dll
QT += qml quick
OBJECTS_DIR = tmp
MOC_DIR = tmp
#INCLUDEPATH += $$PWD/Leap/include
INCLUDEPATH +=C:\04_Qt\QtLeapMotionLibrary-master\QtLeapMotion\Leap\include
INCLUDEPATH += $$PWD/lib/x64
DEPENDPATH += $$PWD/lib/x64INCLUDEPATH += $$PWD/lib/x86
DEPENDPATH += $$PWD/lib/x86include (./QtLeapGlobal/QtLeapGlobal.pri)
include (./QtLeapDevice/QtLeapDevice.pri)
include (./QtLeapGestures/QtLeapGestures.pri)
include (./QtLeapTouch/QtLeapTouch.pri)#win32: {
!contains(QMAKE_HOST.arch, x86_64) {
message("x86 build")
LIBS += $$PWD/Leap/x86/Leap.dll
} else {
message("x86_64 build")
LIBS += $$PWD/Leap/x64/Leap.dll
}
#}
win32: {
!contains(QMAKE_HOST.arch, x86_64) {
message("x86 build")
install_folder.files += $$PWD/Leap/x86/Leap.dll
LIBS += -L$$PWD/lib/x86/ -lLeap
} else {
message("x86_64 build")LIBS += ./Leap/x64/Leapd.lib
install_folder.files += $$PWD/Leap/x64/Leap.dll
install_folder.files += ./Leap/x64/Leapd.dll
LIBS += -L$$PWD/lib/x64/ -lLeap }
}
win32:DESTDIR = ./
Am always facing Undefined reference to all leap lib classes like hand, circle etc. Basically the library is not linking with above configuration. I have proper libs and header files placed in proper path.
Can you suggest any solution using Leap Motion with QT. ?
Thanks for help.
-
@RohitIti said in QtLeapMotion Library not building:
QtLeapMotionLibrary
Are you following the README.md instructions from such library? Especially:
In order to run the examples, you have to download the Leap SDK. Then in QtLeapMotion create a Leap directory in which you'll copy the following directories from the LeapSDK : include x64 -> if on 64 bits architecture x86 -> if on 32 bits architecture
and this step as well:
Open QtLeapMotionLibrary.pro in QtCreator.
I don't know why you're creating another .pro file of your own, which seems to be mixing architectures...
INCLUDEPATH += $$PWD/lib/x64 DEPENDPATH += $$PWD/lib/x64 INCLUDEPATH += $$PWD/lib/x86 DEPENDPATH += $$PWD/lib/x86
-
Hello Pablo J. Rogina,
Thank you for your response. Yes i followed exact steps that is mentioned in "README.md instructions " .
But still i see linker error and there is always error while building .I added below lines just to make sure it will try to refer or link without skipping.
INCLUDEPATH += $$PWD/lib/x64
DEPENDPATH += $$PWD/lib/x64INCLUDEPATH += $$PWD/lib/x86
DEPENDPATH += $$PWD/lib/x86Even without these lines the error remains same. not able to build the library.
I was having 1 doubt here. Do we have to build this only with MSVC compiler or Minfw will also work ?
Currently i am using Mingw. -
Hi,
If it's a C++ library you can't mix and match MSVC and MinGW.
-
Thank you SGaist . Let me try configuring MSVC for QT . I will update this topic after trying out.