提问人:Talha Faraz 提问时间:12/21/2022 最后编辑:MarkusTalha Faraz 更新时间:12/21/2022 访问量:94
对 raspicam 的未定义引用
undefined reference to raspicam
问:
我在 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.
答: 暂无答案
评论
g++