Qt with CVB and qmake

Hi
I want use qt with CVB using qmake. I added lib to file .pro. Qt see library CVB. But when I use make I have this problem:

g++ -c -pipe -O2 -std=c++0x -Wall -W -fPIC  -I. -I/opt/cvb/include -I/usr/lib/aarch64-linux-gnu/qt5/mkspecs/linux-g++ -o main.o main.cpp
g++ -Wl,-O1 -o CVBQt main.o   -L/opt/cvb/lib 
main.o: In function `main':
main.cpp:(.text.startup+0x5c): undefined reference to `TranslateFileName'
main.cpp:(.text.startup+0x6c): undefined reference to `LoadImageFile'
main.cpp:(.text.startup+0xc8): undefined reference to `CanNodeMapHandle'
main.cpp:(.text.startup+0xf8): undefined reference to `G2Grab'
main.cpp:(.text.startup+0x11c): undefined reference to `G2Wait'
main.cpp:(.text.startup+0x144): undefined reference to `GetLinearAccess'
main.cpp:(.text.startup+0x20c): undefined reference to `G2Freeze'
main.cpp:(.text.startup+0x234): undefined reference to `ReleaseObject'
main.cpp:(.text.startup+0x3a8): undefined reference to `NMHGetNodeMap'
main.cpp:(.text.startup+0x3cc): undefined reference to `NMGetNode'
main.cpp:(.text.startup+0x3e4): undefined reference to `NGetAsInteger'
main.cpp:(.text.startup+0x404): undefined reference to `ReleaseObject'
main.cpp:(.text.startup+0x40c): undefined reference to `ReleaseObject'
collect2: error: ld returned 1 exit status
Makefile:134: recipe for target 'CVBQt' failed
make: *** [CVBQt] Error 1

What can I do?

Hi @pavik1994

the functions that the linker cannot find are from libCVCImg.so, libCVCDriver.so and libCVGenApi.so - did you add those to your MakeFile?

Hi @pavik1994 ,

Could you by any chance upload the project files for a Qmake + CVB project.
Reason: We mostly use cmake or .sln, but I’m sure others might be interested in a Qmake example.

(I’m just asking for the text of the .pro file)
A simple “No” is a resonable response xD.

Cheers,

Christopher

I added to .pro this lines:

QMAKE_RPATHDIR += /opt/cvb/lib/genicam
LIBS += -L/opt/cvb/lib/
LIBS += -lCVCImg
LIBS += -lCVCUtilities
LIBS += -lCVCDriver
LIBS += -lCVGenApi

1 Like