[AGENT++] Disabling Logging from application using SNMP++ (win32)

John McCaskey jmccaskey at gmail.com
Mon Mar 13 22:55:43 CET 2006


Jochen,

Hey, thanks again for another quick response!  Comments inline...

On 3/13/06, Jochen Katz <katz at agentpp.com> wrote:
>
> Hello again,
>
> > When I compile under win32 after linking snmp_pp dynamically I get
> issues
> > with:
> >
> > PollingClient error LNK2001: unresolved external symbol "protected:
> static
> > class AgentLog * DefaultLog::instance"
> > (?instance at DefaultLog@@1PAVAgentLog@@A)
>
> this symbol is defined in log.cpp. So if this file is within your snmp++
> project it must be resolvable. Is this the only linker error you get?
>
> To disable all logging, you can activate the #define _NO_LOGGING in
> config_snmp_pp.h. Lovering the level in the set_filter() calls will also
> reduce logging output.



No, it's not the only symbol I have problems with -- I'm now getting it on
the Snmp::v3Lock variable as well.  It seems to be a Visual Studio issue as
I've been googling it and alot of people apparently have problems with
getting an undefined external error on static class members that are inside
DLL files even when the class has been exported.  I haven't figured out how
to fix it yet, if I do it might be something that can be revised in your
VC++ project file.  However, what I really need for my production builds is
just to disable logging so that define will get the job done in the event I
can't  get VS.net to behave.  Thanks!

Regards,
>   Jochen
>
>
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp
>



More information about the AGENTPP mailing list