Hi,
i’m using QT Creator as an IDE. My problem is, as stated in the topic name, that i’m getting a error that i have undefinded references as long its in the opencv-lib. The lib is installed under /usr/include/opencv4/opencv2/… and can be found by the IDE, but i’m getting these errors after i compiled the programm.
[ 50%] Linking CXX executable Trx2
CMakeFiles/Trx2.dir/main.cpp.o: In function `main’:
main.cpp:(.text+0x34): undefined reference to `cv::VideoCapture::VideoCapture(int, int)’
main.cpp:(.text+0x40): undefined reference to `cv::VideoCapture::~VideoCapture()’
collect2: error: ld returned 1 exit status
make[2]: *** [Trx2] Error 1
make[1]: *** [CMakeFiles/Trx2.dir/all] Error 2
make: *** [all] Error 2
CMakeFiles/Trx2.dir/build.make:94: recipe for target ‘Trx2’ failed
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/Trx2.dir/all’ failed
Makefile:83: recipe for target ‘all’ failed
15:05:54: The process “/usr/bin/cmake” exited with code 2.
Error while building/deploying project Trx2 (kit: Desktop)
When executing step “CMake Build”
15:05:54: Elapsed time: 00:01.
I’m using opencv version 4.10.0-dev and Jetpack 4.6.5 [L4T 32.7.5].
I had tried everything that i came up with. I reinstalled opencv, used different tutorials for the installation, used building scripts such as the ones from jetsonHacks and Q-engineering (with CUDA and QT support). I also loaded the jetpack on my SD-Card again.
i want to use opencv with CUDA, Cudnn and QT Creator as an IDE to build a robot with a team. Normal Libs function just fine
we are thankfull for every little help ;)
Thats the simplest Program i came up with:
//include “opencv4/opencv2/opencv.hpp”
include “opencv4/opencv2/highgui.hpp”
include <opencv4/opencv2/core.hpp>
include <opencv4/opencv2/videoio.hpp>
include <stdio.h>
using namespace cv;
using namespace std;
int main(int argc, char const *argv)
{
//Open the default video camera
cv::VideoCapture cap(0);
return 0;
}