Question about build agent++ a dll with VC6

lsq song_q_lee____tom.com
Fri May 30 06:35:29 CEST 2003


Hi all

I have made snmp++ a dll and I want to build agent++ a dll with Visual C++ 6.0, too.

So I build a empty Win32 Dll project,and add all files under \src,\include folders(except \agent_pp)
to the project.
then add _NO_SNMPv3 SNMP_PP_DLL AGENT_PP_DLL AGENT_PP_EXPORTS to preprocessor
link with ws2_32.lib snmp_pp.lib

when compiled,I got many warrning like this,

mib.cpp
e:\project\snmp&agent++\agent++\include\list.h(1353) : warning C4275: non dll-interface class 'Array<class MibLeaf>' used as base for dll-interface class 'OrderedArray<class MibLeaf>'
        e:\project\snmp&agent++\agent++\include\mib.h(762) : see reference to class template instantiation 'OrderedArray<class MibLeaf>' being compiled


then I checked the mib.h,it  writes
-#if !defined (AGENTPP_DECL_TEMPL_ORDEREDARRAY_MIBLEAF)
-#define AGENTPP_DECL_TEMPL_ORDEREDARRAY_MIBLEAF
-	AGENTPP_DECL_TEMPL template class AGENTPP_DECL OrderedArray<MibLeaf>;
-#endif

so I add   "AGENTPP_DECL_TEMPL template class AGENTPP_DECL Array<MibLeaf>;" under the define,
then the dll was builded successfully.

Did I miss something that will make the build progress running successfully without changing
the source code?

I have noticed there were three files(agent_pp.cpp agent_pp.h stdafx.h) in the "agent_pp" folder.
If I added them to the project and builded,some errors occoured
- e:\project\snmp&agent++\agent++\agent_pp\agent_pp.h(118) : error C2004: expected 'defined(id)'
do I need to finish the agent_pp.h by add some "id"?

Another question is,when I read the project for MSVC7(download from agent++ site),no "snmp_pp.lib" is linked there.Is it not neccessary for build agent++ dll?

Thanks in advance.

Sigurd


       song_q_lee at tom.com
          2003-05-30





More information about the AGENTPP mailing list