g++ -I /THL5/home/cv/a4.opencv-3.4.16/include/ -L /THL5/home/cv/a4.opencv-3.4.16/lib64 -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_core -lopencv_cudaarithm -lopencv_cudalegacy -O3 $1 -o $2 yhrun -p TH_GPU $2 lib64/libopencv_cudalegacy.so: undefined reference to symbol '_ZN2cv4cuda8cvtColorERKNS_11_InputArrayERKNS_12_OutputArrayEiiRNS0_6StreamE' /usr/bin/ld: note: '_ZN2cv4cuda8cvtColorERKNS_11_InputArrayERKNS_12_OutputArrayEiiRNS0_6StreamE' is defined in DSO /THL5/home/test653/z1.gog/14.imageProcessing/a4.opencv-3.4.16/lib64/libopencv_cudaimgproc.so.3.4 so try adding it to the linker command line /THL5/home/xxxa4.opencv-3.4.16/lib64/libopencv_cudaimgproc.so.3.4: could not read symbols: 无效的操作 collect2: 错误:ld 返回 1 ** (Original Image :13890): WARNING **: Could not open X display OpenCV(3.4.16) Error: Unspecified error (Can't initialize GTK backend) in cvInitSystem, file /THL5/home/test653/z1.gog/14.imageProcessing/a4.opencv-3.4.16/modules/highgui/src/window_gtk.cpp, line 624 terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.16) /THL5/home/te333.16/modules/highgui/src/window_gtk.cpp:624: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem' yhrun: error: gn1: task 0: Aborted 09_haar_eye_gpu.cpp: 在函数‘int main()’中: 09_haar_eye_gpu.cpp:22:5: 错误:‘cascade’在此作用域中尚未声明 cascade->detectMultiScale(d_image, d_buf); ^~~~~~~ 09_haar_eye_gpu.cpp:22:5: 附注:suggested alternative: ‘cascadeGPU’ cascade->detectMultiScale(d_image, d_buf); ^~~~~~~ cascadeGPU slurmstepd: error: execve(): 09.exe: No such file or directory yhrun: error: gn1: task 0: Exited with exit code 2 确实没有定义 |
说点什么...