[AGENT++] Building Agent++ library in borland C++ ( 5.01) in windows 2000
Vinoth
vinoth at isoftel.com
Mon Mar 15 12:27:44 CET 2004
Hi all,
Sorry I missed out the version information in my previous mail.
Agent++ - Version 3.5.16
snmp++ - Version 3.2.10a
lib des - Version 4.01
I tried building the above Agent++ library in borland C++ (5.01) and make
(4.0) in windows 2000 machine.
Please find the steps followed/changes made in compiling the libraries.
Please help me to solve the below problems, in building snmp++ & agent++
library.
Build libdes library.
=============
I was not able to build libdes library, with the make file given. I
don't have an option make bcc.!! . So I includes all the libdes source file
in the borland IDE, and was able to compile the lib file.
Build snmp++ library
================
1) MAKE Version 4.0 Copyright (c) 1987, 1996 Borland International
Fatal: '..\include\config.h' does not exist - don't know how to make it
So changed the makefile.bcc to include "config_snmp_pp.h" , instead of
"config.h".
2) Error ..\include\config_snmp_pp.h 140: Unknown preprocessor directive:
'warning'
Error ..\include\config_snmp_pp.h 149: Unknown preprocessor directive:
'warning'
Error ..\include\config_snmp_pp.h 158: Unknown preprocessor directive:
'warning'
- Commented out the above mentioned lines in the file "
..\include\config_snmp_pp.h"
3) Error address.cpp 825: Call to undefined function 'inet_aton' in function
IpAddress::addr_to_friendly()
In "config_snmp_pp.h", added new check as mentioned below
// We have inet_aton() function if not compiling with VC++ or Borland C++
#ifndef _MSC_VER
#ifndef __BCPLUSPLUS__
#define HAVE_INET_ATON
#endif
#endif
4) Error uxsnmp.cpp 1828: Two operands must evaluate to the same type in
function Snmp::broadcast_discovery(SnmpCollection<UdpAddress> &,const
int,const UdpAddress &,const snmp_version,const OctetStr *)
Error uxsnmp.cpp 1829: Could not find a match for
'SnmpMessage::load(Pdu,undefin ed,const snmp_version)' in function
Snmp::broadcast_discovery(SnmpCollection<UdpAddress> &,const int,const
UdpAddress &,const snmp_version,const OctetStr *)
changed the ternary operator to standard if-else statements.
5) Error v3.cpp 37: Unable to open include file 'unistd.h'
Error v3.cpp 318: Call to undefined function '_unlink' in function
saveBootCount
er(const char *,const OctetStr &,const unsigned int)
made the changes in V3.cpp
#ifndef _MSC_VER
#ifndef __BCPLUSPLUS__
#include <unistd.h>
#endif
#endif
As , V3 is not our requirement, we changed the config_snmp_pp.h as follows
// define _NO_SNMPv3 here or in the Makefile if you do not want to use
SNMPv3
// (default is to use SNMPv3)
#define _NO_SNMPv3
6)Then, when I tried to make, I got an error as "Command line arguments too
long". So I upgraded the make file version to 5.2.
7) MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
tlib ..\lib\snmp_pp.lib /a address.obj counter.obj ctr64.obj
gauge.obj integer.obj octet.obj oid.obj pdu.obj target.obj timetick.obj
vb.obj asn1.obj snmpmsg.obj uxsnmp.obj eventlist.obj msgqueue.obj
userdefined.obj usertimeout.obj msec.obj notifyqueue.obj sha.obj v3.obj
usm_v3.obj mp_v3.obj idea.obj auth_priv.obj reentrant.obj md5c.obj
TLIB 4.00 Copyright (c) 1987, 1996 Borland International
Warning: unknown command line switch 'a' ignored
Error: unexpected char 'a' in command line
- I tried commenting out '/a' switch from the makefile.bcc, but was not
successful...
Can anyone suggest me a way, to overcome the above error...
Build agent++ library
===============
Then I tried compiling agent++. After many warning on "inline functions". I
got the following errors.
Error ..\include\List.h 1261: 'clone' is not a member of 'TaskManager' in
function Array<TaskManager>::clone()
Error ..\include\List.h 1273: 'clone' is not a member of 'TaskManager' in
function Array<TaskManager>::operator =(const Array<TaskManager> &)
Error ..\include\List.h 1272: Too many error or warning messages in template
Array<MibEntry>
*** 3 errors in Compile ***
tlib /P32 ..\lib\agent_pp.lib /a mib.obj log.obj threads.obj
tools.obj mib_entry.obj snmp_group.obj request.obj snmp_pp_ext.obj
snmp_request.obj mib_proxy.obj snmp_counters.obj system_group.obj
mib_avl_map.obj mib_map.obj mib_context.obj v3_mib.obj vacm.obj
snmp_textual_conventions.obj snmp_target_mib.obj snmp_notification_mib.obj
notification_originator.obj avl_map.obj map.obj sim_mib.obj
agentpp_simulation_mib.obj mib_policy.obj snmp_proxy_mib.obj
snmp_community_mib.obj mib_complex_entry.obj proxy_forwarder.obj
notification_log_mib.obj
TLIB 4.00 Copyright (c) 1987, 1996 Borland International
Warning: unknown command line switch 'a' ignored
Error: unexpected char 'm' in command line
** error 1 ** deleting agent_pp.lib
Please advice, on how to solve the above errors in building agent++??
Expecting your earliest reply,
Thanks in advance,
Vinoth.
More information about the AGENTPP
mailing list