[libcamera-devel] Question about libcamera headers

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Jun 29 10:46:09 CEST 2020


Hi David,

On 29/06/2020 09:43, Laurent Pinchart wrote:
> 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.

There is a small 'simple-cam' test app that might be a useful starting
point for you for the meson.build file.

	https://github.com/kbingham/simple-cam/

Hope this helps.

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list