[libcamera-devel] Question about libcamera headers
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Jun 29 10:43:42 CEST 2020
Hi David,
On Mon, Jun 29, 2020 at 09:17:51AM +0100, David Plowman wrote:
> Hi everyone
>
> Probably a silly question, but maybe someone can enlighten me...
>
> I'm trying to build my libcamera apps against the version that I've
> "installed" on my Pi. In my file I have "#include
> <libcamera/camera_manager.h>", but I get a "header not found" error.
> And it's right, camera_manager.h is actually installed to
> /usr/local/include/libcamera/libcamera (note the double libcamera).
> But including libcamera/libcamera/camera_manager.h fails too when it
> meets the includes inside camera_manager.h.
>
> I assume I've missed something obvious... any suggestions?
You need to pass -I/usr/local/include/libcamera to the compiler. The
compiler (and linker) flags are provided by pkg-config:
$ pkg-config --cflags camera
-I/usr/local/include/libcamera
You may need to set PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig/
depending on your system configuration.
I would recommend building your libcamera application with meson, it
will then handle pkg-config for you.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list