[AGENT++] [PATCH 0/2] SNMP++ Include files fixes
Luca Ceresoli
luca at lucaceresoli.net
Mon Sep 5 13:53:24 CEST 2016
Dear Jochen,
thanks for your feedback.
On 02/09/2016 23:35, Jochen Katz wrote:
> Hello,
>
>> here are two fixes to add missing #includes that I had to apply to
>> snmp++ header files in order fo build an application on top of
>> agent++.
>>
>> Without these fixes both snmp++ 3.3.7 and agent++ 4.0.6 build without
>> errors, but applications using them fail because the snmp++ header
>> files use some functions and types without including the relevant
>> header files.
>
> I assume that your project does not use autoconf. So your project /
Indeed my project is CMake based, not autotools-based.
> compiler call is missing several defines that are needed by the
> agent++/snmp++ headers. For example sys/socket.h is included like this:
>
> # ifdef HAVE_SYS_SOCKET_H
> # include <sys/socket.h>
> # endif
>
> 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.
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?
Thanks,
--
Luca
More information about the AGENTPP
mailing list