对 raspicam 的未定义引用

问题描述 投票:0回答:1

我在 geany 编译器中的相机初始化中遇到了一些错误

g++ $(pkg-config opencv4 --cflags --libs) -o g++ $(pkg-config raspicam --cflags --libs) -o cameratest cameratest.cpp (in directory: /home/pi/Desktop)
/usr/bin/ld: /tmp/cc3JiNr2.o: in function `main':
cameratest.cpp:(.[text+0x14): undefined reference to `raspicam::RaspiCam_Cv::RaspiCam_Cv()'
/usr/bin/ld: cameratest.cpp:(.text+0x3c): undefined reference to `raspicam::RaspiCam_Cv::open()'
/usr/bin/ld: cameratest.cpp:(.text+0x9c): undefined reference to `raspicam::RaspiCam_Cv::getId[abi:cxx11]() const'
/usr/bin/ld: cameratest.cpp:(.text+0xd8): undefined reference to `raspicam::RaspiCam_Cv::~RaspiCam_Cv()'
/usr/bin/ld: cameratest.cpp:(.text+0x108): undefined reference to `raspicam::RaspiCam_Cv::~RaspiCam_Cv()'
collect2: error: ld returned 1 exit status
Compilation failed.
opencv undefined-reference geany
1个回答
0
投票

我也面临着同样的问题,但我没有解决方案...任何人都可以给出答案吗..如果有人有答案请回复

© www.soinside.com 2019 - 2024. All rights reserved.