[AGENT++] Building Agent++ using BCC 5.0 in windows 2000
Jochen Katz
katz at agentpp.com
Fri Feb 27 22:57:08 CET 2004
Hi,
> Then I tried to build snmp++, using the makefile - Makefile.bcc
>
> I got the following errors,
>
> 1) file config.h was not found.
> - I changed the include file name as config_snmp_pp.h
will be fixed in the next release...
> /Error address.cpp 825: Call to undefined function 'inet_aton' in
> function IpAddress::addr_to_friendly()
> *** 1 errors in Compile ***/
>
> - I commented out the following line in config_snmp_pp.h
>
> /// We have inet_aton() function if not compiling with VC++
> #ifndef _MSC_VER
> **/*/// #define HAVE_INET_ATON
> /*/#endif/
The next release will use:
// We have inet_aton() function if not compiling with VC++ or Borland C++
#ifndef _MSC_VER
#ifndef __BCPLUSPLUS__
#define HAVE_INET_ATON
#endif
#endif
> /Error uxsnmp.cpp 1828: Two operands must evaluate to the same type in
> function Snmp::broadcast_discovery(SnmpCollection<UdpAddress> &,const
> int,const UdpAddress &,const snmp_version,const OctetStr *)
> Error uxsnmp.cpp 1829: Could not find a match for
> 'SnmpMessage::load(Pdu,undefined,const snmp_version)' in function
> Snmp::broadcast_discovery(SnmpCollection<UdpAddress> &,const int,const
> UdpAddress &,const snmp_version,const OctetStr *)/
This is caused by the ? operator which returns either an OctetStr or a
char*. Change the lines to:
...
pdu.set_type(sNMP_PDU_GET); // set pdu type
OctetStr get_community;
if (community)
get_community = *community;
else
get_community = "public";
int status = snmpmsg.load(pdu, get_community, version);
if (status != SNMP_CLASS_SUCCESS)
...
I really would like to know if the old code is illegal or if the borland
compiler is broken... ;-)
Regards,
Jochen
More information about the AGENTPP
mailing list