Reply To: Adding OpenCV library to a Qt project

Sysprogs forums Forums VisualGDB Adding OpenCV library to a Qt project Reply To: Adding OpenCV library to a Qt project

#8034
support
Keymaster

Hi,

It looks like you are trying to add header files (.hpp) to the library list. This won’t work as those are different types of files. Header files contain definitions of your functions and you should be referenced by adding their directories to the Include Directories field. Then the #include<> directories will handle them properly. When this is not setup properly, you will get errors like “cannot open file xxx.h”.

Library files (.a or .so) contain compiled implementations of your functions and should be added to the Library Names field (without the ‘lib’ prefix and extension, more details here). When some libraries are missing, you will typically get errors like “unresolved reference to xxx”.

We would recommend first solving the problems with the header files (the code should at least compile and then get stuck at ‘unresolved reference’ problems) and then add the missing libraries to VisualGDB Project Properties. You can find the libraries by simply searching the OpenCV build directory for .a and .so files.