# Qt with CVB and qmake

**URL:** <https://forum.commonvisionblox.com/t/qt-with-cvb-and-qmake/349>\
**Category:** C-style API\
**Tags:** qt\
**Created:** [January 23, 2018, 2:44pm UTC](https://forum.commonvisionblox.com/t/qt-with-cvb-and-qmake/349 "2018-01-23T14:44:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavik1994](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@pavik1994](https://forum.commonvisionblox.com/u/pavik1994)\
**Post date:** [January 23, 2018, 2:44pm UTC](https://forum.commonvisionblox.com/t/qt-with-cvb-and-qmake/349/1 "2018-01-23T14:44:04Z")

</div>

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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![illusive](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/illusive/32/61_2.png) [@illusive](https://forum.commonvisionblox.com/u/illusive)\
**Post date:** [January 24, 2018, 8:06am UTC](https://forum.commonvisionblox.com/t/qt-with-cvb-and-qmake/349/2 "2018-01-24T08:06:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![c.hartmann](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/c.hartmann/32/247_2.png) [@c.hartmann](https://forum.commonvisionblox.com/u/c.hartmann)\
**Post date:** [January 30, 2018, 9:24am UTC](https://forum.commonvisionblox.com/t/qt-with-cvb-and-qmake/349/3 "2018-01-30T09:24:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pavik1994](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@pavik1994](https://forum.commonvisionblox.com/u/pavik1994)\
**Post date:** [January 30, 2018, 2:01pm UTC](https://forum.commonvisionblox.com/t/qt-with-cvb-and-qmake/349/4 "2018-01-30T14:01:19Z")

</div>

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
