Agent++, MSVC, and namespaces
Frank Fock
Frank.Fock____t-online.de
Tue Mar 26 23:48:36 CET 2002
Paul,
I have already answered your question in comp.protocols.snmp. The
answer is: upgrade to VC++ 7.0, which now is (nearly?) 100% ANSI
C++ compliant. With 7.0 namespaces should work.
Best regards,
Frank
Paul Kapp wrote:
> (This was originally posted to comp.protocols.snmp, but this list appears
> to be a better target audience)
>
> Hello,
>
> I have been working with the SNMP++/Agent++/AgentX++ source for a while,
> and have build libraries and examples under both Linux (very smooth),
> and Windows (static libs only, for now). Everything works out great for
> the examples, as well as some additional personal test programs, but now
> that I want to implement an AgentX subagent with existing code, I now
> have big problems.
>
> I get link problems, because our existing code uses our own thread
> abstraction class named Thread (how original), which conflicts with the
> Thread class used within Agent++. The obvious solution looks to be
> nearly there, as the Agent++ source wraps its classes in its own
> namespace, but only if compiled under gcc 2.91 (or higher). When I
> attempt to explicitly #define AGENTPP_NAMESPACE, the Microsoft compiler
> (VC++ 6.0/Win2000) cannot build many Agent++ library components,
> complaining about 'end of file' in many header files, as well as other
> errors that do not appear if not using AGENTPP_NAMESPACE (although,
> according to GCC under Linux, the source is quite sound).
>
> I haven't yet found what the big problem is yet, but I assume this is
> why AGENTPP_NAMESPACE is only defined for the gcc compiler. If anyone
> else has encountered this type of problem before, I would appreciate any
> assistance in getting this cleared up.
>
> Thanks in advance.
>
> Paul.
> (notrump at mac.com)
More information about the AGENTPP
mailing list