[AGENT++] Agent++ Compile problems under Solaris 9/10

Jochen Katz katz at agentpp.com
Thu Dec 21 20:28:18 CET 2006


Hi,

> "address.cpp", line 772: Error: Formal argument 2 of type hostent* in call
> to gethostbyname_r(const char*, hostent*, char*, int, int*) is being passed
> int.

> I went ahead and undefed modified config_snmp_pp.h as follows:
> 
> #undef SNMP_PP_IPv6
> 
> Is this the right way to go?

well, for a fast solution it is ok, but I would prefer if you could send
me some possible change for the #if line, so IPv6 can be automatically
disabled for this compiler/os/lib version.

#if !defined WIN32 && !(defined (CPU) && CPU == PPC603)
#define SNMP_PP_IPv6

> Undefined                       first referenced
> symbol                             in file
> inet_aton                           ../../../../snmp++/lib/libsnmp++.so

Did the compiler issue a warning about inet_aton() in address.cpp? If
not, adding -lresolv and/or -lnsl to the linker command could solve it.
If yes, comment out the "#define HAVE_INET_ATON" in config_snmp_pp.h,
-lnsl/-lresolv might be needed in this case, too.

Regards,
  Jochen







More information about the AGENTPP mailing list