Hi, i am trying to build the liblapin but the compilation is failling on the camera.
I've setup the required dependencies listed in the README:
sfml: version 2.5.1
libffcall: version 2.4
libusb, with the exposed legacy API (for usb.h header)
opencv: version 4.7.0
including also libudev (with libudev-zero replacement) which seems to be required but not mentioned.
To bootstrap the compilation process, I had to patch the Makefile a bit, removing the incorrect echo absolute path, and the -Werror cflag.
The file src/camera/new_camera.cpp fails to compile, with the following error:
src/camera/new_camera.cpp: In function 't_bunny_camera* bunny_new_camera(int)':
src/camera/new_camera.cpp:18:42: error: 'CAP_V4L2' is not a member of 'cv'
18 | cam = new cv::VideoCapture(id, cv::CAP_V4L2);
| ^~~~~~~~
The V4L2 module may not be enabled by default on opencv, which is the soure of the problem.
However, I noticed that opencv is bound only to the camera directory, so i tried a build, after removing it. Although it did succeed, a better way to toggle the feature could be nice. This would allow a clean build of the library to be used, without the camera support.
It would be possible to add check function to detect whether the camera module is available, so that software using it can fallback or exit properly.
Hi, i am trying to build the liblapin but the compilation is failling on the camera.
I've setup the required dependencies listed in the README:
sfml
: version2.5.1
libffcall
: version2.4
libusb
, with the exposed legacy API (forusb.h
header)opencv
: version4.7.0
including also
libudev
(withlibudev-zero
replacement) which seems to be required but not mentioned. To bootstrap the compilation process, I had to patch the Makefile a bit, removing the incorrectecho
absolute path, and the-Werror
cflag.The file
src/camera/new_camera.cpp
fails to compile, with the following error:The
V4L2
module may not be enabled by default onopencv
, which is the soure of the problem.However, I noticed that
opencv
is bound only to thecamera
directory, so i tried a build, after removing it. Although it did succeed, a better way to toggle the feature could be nice. This would allow a clean build of the library to be used, without the camera support.It would be possible to add check function to detect whether the camera module is available, so that software using it can fallback or exit properly.