Trying to compile: libcamera_cpp_demo-master
Looking for suggestions.
Getting the following:
make -j4
[ 66%] Building CXX object CMakeFiles/libcamera-demo.dir/main.cpp.o
[ 66%] Building CXX object CMakeFiles/libcamera-demo.dir/LibCamera.cpp.o
In file included from /usr/include/libcamera/libcamera/stream.h:15,
from /usr/include/libcamera/libcamera/camera.h:22,
from /usr/include/libcamera/libcamera/libcamera.h:11,
from /home/pi/libcamera_cpp_demo-master/LibCamera.h:21,
from /home/pi/libcamera_cpp_demo-master/LibCamera.cpp:1:
/usr/include/libcamera/libcamera/color_space.h:61:41: error: ‘optional’ in namespace ‘std’ does not name a template type
61 | static std::string toString(const std::optional<ColorSpace> &colorSpace);
| ^~~~~~~~
/usr/include/libcamera/libcamera/color_space.h:61:36: note: ‘std::optional’ is only available from C++17 onwards
61 | static std::string toString(const std::optional<ColorSpace> &colorSpace);
| ^~~
/usr/include/libcamera/libcamera/color_space.h:61:49: error: expected ‘,’ or ‘...’ before ‘<’ token
61 | static std::string toString(const std::optional<ColorSpace> &colorSpace);
| ^
In file included from /usr/include/libcamera/libcamera/camera.h:22,
from /usr/include/libcamera/libcamera/libcamera.h:11,
from /home/pi/libcamera_cpp_demo-master/LibCamera.h:21,
from /home/pi/libcamera_cpp_demo-master/LibCamera.cpp:1:
/usr/include/libcamera/libcamera/stream.h:51:7: error: ‘optional’ in namespace ‘std’ does not name a template type
51 | std::optional<ColorSpace> colorSpace;
| ^~~~~~~~
/usr/include/libcamera/libcamera/stream.h:51:2: note: ‘std::optional’ is only available from C++17 onwards
51 | std::optional<ColorSpace> colorSpace;
| ^~~
/home/pi/libcamera_cpp_demo-master/LibCamera.cpp: In member function ‘int LibCamera::startCapture()’:
/home/pi/libcamera_cpp_demo-master/LibCamera.cpp:109:38: error: ‘const class libcamera::SharedFD’ has no member named ‘fd’; did you mean ‘std::shared_ptr<libcamera::SharedFD::Descriptor> libcamera::SharedFD::fd_’? (not accessible from this context)
109 | plane.fd.fd(), 0);
| ^~
In file included from /usr/include/libcamera/libcamera/framebuffer.h:17,
from /usr/include/libcamera/libcamera/stream.h:16,
from /usr/include/libcamera/libcamera/camera.h:22,
from /usr/include/libcamera/libcamera/libcamera.h:11,
from /home/pi/libcamera_cpp_demo-master/LibCamera.h:21,
from /home/pi/libcamera_cpp_demo-master/LibCamera.cpp:1:
/usr/include/libcamera/libcamera/base/shared_fd.h:46:30: note: declared private here
46 | std::shared_ptr<Descriptor> fd_;
| ^~~
/home/pi/libcamera_cpp_demo-master/LibCamera.cpp:110:41: error: ‘const class libcamera::SharedFD’ has no member named ‘fd’; did you mean ‘std::shared_ptr<libcamera::SharedFD::Descriptor> libcamera::SharedFD::fd_’? (not accessible from this context)
110 | mappedBuffers_[plane.fd.fd()] =
| ^~
In file included from /usr/include/libcamera/libcamera/framebuffer.h:17,
from /usr/include/libcamera/libcamera/stream.h:16,
from /usr/include/libcamera/libcamera/camera.h:22,
from /usr/include/libcamera/libcamera/libcamera.h:11,
from /home/pi/libcamera_cpp_demo-master/LibCamera.h:21,
from /home/pi/libcamera_cpp_demo-master/LibCamera.cpp:1:
/usr/include/libcamera/libcamera/base/shared_fd.h:46:30: note: declared private here
46 | std::shared_ptr<Descriptor> fd_;
| ^~~
/home/pi/libcamera_cpp_demo-master/LibCamera.cpp: In member function ‘bool LibCamera::readFrame(LibcameraOutData*)’:
/home/pi/libcamera_cpp_demo-master/LibCamera.cpp:178:54: error: ‘const class libcamera::SharedFD’ has no member named ‘fd’; did you mean ‘std::shared_ptr<libcamera::SharedFD::Descriptor> libcamera::SharedFD::fd_’? (not accessible from this context)
178 | void *data = mappedBuffers_[plane.fd.fd()].first;
| ^~
In file included from /usr/include/libcamera/libcamera/framebuffer.h:17,
from /usr/include/libcamera/libcamera/stream.h:16,
from /usr/include/libcamera/libcamera/camera.h:22,
from /usr/include/libcamera/libcamera/libcamera.h:11,
from /home/pi/libcamera_cpp_demo-master/LibCamera.h:21,
from /home/pi/libcamera_cpp_demo-master/LibCamera.cpp:1:
/usr/include/libcamera/libcamera/base/shared_fd.h:46:30: note: declared private here
46 | std::shared_ptr<Descriptor> fd_;
| ^~~
make[2]: *** [CMakeFiles/libcamera-demo.dir/build.make:95: CMakeFiles/libcamera-demo.dir/LibCamera.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/libcamera/libcamera/stream.h:15,
from /usr/include/libcamera/libcamera/camera.h:22,
from /usr/include/libcamera/libcamera/libcamera.h:11,
from /home/pi/libcamera_cpp_demo-master/LibCamera.h:21,
from /home/pi/libcamera_cpp_demo-master/main.cpp:6:
/usr/include/libcamera/libcamera/color_space.h:61:41: error: ‘optional’ in namespace ‘std’ does not name a template type
61 | static std::string toString(const std::optional<ColorSpace> &colorSpace);
| ^~~~~~~~
/usr/include/libcamera/libcamera/color_space.h:61:36: note: ‘std::optional’ is only available from C++17 onwards
61 | static std::string toString(const std::optional<ColorSpace> &colorSpace);
| ^~~
/usr/include/libcamera/libcamera/color_space.h:61:49: error: expected ‘,’ or ‘...’ before ‘<’ token
61 | static std::string toString(const std::optional<ColorSpace> &colorSpace);
| ^
In file included from /usr/include/libcamera/libcamera/camera.h:22,
from /usr/include/libcamera/libcamera/libcamera.h:11,
from /home/pi/libcamera_cpp_demo-master/LibCamera.h:21,
from /home/pi/libcamera_cpp_demo-master/main.cpp:6:
/usr/include/libcamera/libcamera/stream.h:51:7: error: ‘optional’ in namespace ‘std’ does not name a template type
51 | std::optional<ColorSpace> colorSpace;
| ^~~~~~~~
/usr/include/libcamera/libcamera/stream.h:51:2: note: ‘std::optional’ is only available from C++17 onwards
51 | std::optional<ColorSpace> colorSpace;
| ^~~
make[2]: *** [CMakeFiles/libcamera-demo.dir/build.make:82: CMakeFiles/libcamera-demo.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/libcamera-demo.dir/all] Error 2
make: *** [Makefile:103: all] Error 2