[AGENT++] Re: Getting agent++ to build under Mac OS X

Jochen Katz katz at agentpp.com
Wed Feb 4 00:38:35 CET 2009


Hi,

> I have been using the .linux Makefiles all day today.  Is that the one I 
> should use?

yes. The default is to build both, a static and a shared lib. If you use
"make -f Makefile.linux lib" only the static lib is built.

> In snmp++ I get errors about gethostbyaddr_r and gethostbyname_r.
> address.cpp: 828 and 965
> I see there are macro wraps on this, but my leopard computer doesn't 
> figure this out.

The config_snmp_pp.h assumes that if a gcc is used, the _r functions are
available. You can change this in the header. You will then get warnings
if you compile snmp++ with threads enabled: Although snmp++ uses a mutex
around the gethostbyname() and gethostbyaddr() functions, if the
application uses its own threads and uses these functions at the same
time, a crash can occur. Luckily these functions are only used in the
Address classes and not called by snmp++ itself. Only if the application
passes host names or requests to get a host name from IP, the address
class uses these functions.

> The strangest error I get (I'll let you know if this is fixed by your new 
> snapshot) is when building agent++:
> 
> ld: duplicate symbol Agentpp::Array<Agentpp::Thread>::size() constin 
> threads_sh.o and mib_sh.o

You're not alone: :-(
http://lists.apple.com/archives/xcode-users/2008/jan/msg00554.html
Some other search results state that is has something to do with inline,
but I will have to read some more, to find a solution.

Regards,
  Jochen



More information about the AGENTPP mailing list