[AGENT++] [PATCH 0/2] SNMP++ Include files fixes

Luca Ceresoli luca at lucaceresoli.net
Mon Sep 19 15:27:23 CEST 2016


Dear Jochen,

On 05/09/2016 23:08, Jochen Katz wrote:
> Hello,
> 
>>> The files ...++/config.h files show these defines.
>>
>> I assumed the public, installed header files should be platform
>> independent and self-contained. But it doesn't seem to e the case with
>> config_snmp_pp.h, as in the !WIN32 case it doesn't include any files
>> except (conditionally) poll.h, yet it uses socklen_t and struct
>> sockaddr_storage.
> 
> the agent++/snmp++ headers fully rely on the defines in the internal
> config.h.
> 
>> So what is the suggested way to build a non-autotools project on top of
>> agent++/snmp++? Is there a list of #includes and other things I should
>> do before including agent++/snmp++ header files?
> 
> If you put the defines from config.h into a new header file and include
> this new header before snmp++/agent++ headers, it will work. Note: The
> defines PACKAGE..., LT_OBJDIR and OS_TYPE are not needed.
> 
> I will check if and how this can be changed...

That would be very appreciated, thanks.

Most libraries out there can be used by just including their header
files, without the need to define any constants before. In other words,
they have no configuration-dependent code in their exported include files.

It would be great if SNMP++ and AGENT++ could be used in the same way,
or at least if it exported all the needed compilation flags via pkg-config.

Regards.
-- 
Luca


More information about the AGENTPP mailing list