Recompiled static_table, get the following errors....

Nick Woods nwoods____pivia.com
Thu Jul 5 02:21:26 CEST 2001


This is my first time using the agent++ API and objects and to get
myself started I thought that I would try basing my first program off of
the static_table example.  I moved the static_table agent.cpp file into
a different directory and created a new Makefile to see if I could get
it all to work together in my tree.  Everything compiles fine and my
Makefile looks pretty similar to that of the static_table example , but
when I run my newly compiled copy of the example I get the following
output.

20010705.00:10:30: 22356: (1)EVENT  : main: SNMP listen port: (4700).
20010705.00:10:30: 22356: (1)ERROR  : MibGroup: cannot add MIB object
with (oid) to (group): (0.0.0.717547904.134547896.0.1.9.1),
(1.3.6.1.2.1.1).
20010705.00:10:30: 22356: (3)DEBUG  : MibContext: adding MIB object
(context)(oid): (), (1.3.6.1.2.1.1).
20010705.00:10:30: 22356: (3)DEBUG  : MibContext: adding MIB object
(context)(oid): (), (1.3.6.1.2.1.11).
20010705.00:10:30: 22356: (1)ERROR  : MibGroup: cannot add MIB object
with (oid) to (group): (0.0.0.717547904.134547920.0.12.1.2.1),
(1.3.6.1.6.3.12).

and then the program seg faults.

The same static_table program works just fine when I build it in the
examples directory.  I've tried to compile it with and without v3
support and get the same errors.  Any ideas as to what could be
different or could be causing me problems?

My Makefile follows.  I have renamed agent.cpp to sample_agent.cxx for
my test.  Note:  I have a Makefile.incl file with some basic rules for
the compiler, etc. set up that you do not see here, and I am using gcc
under a fully patched RedHat Linux 7.0.

#####################################
PROG = sample_agent
TARGETS = $(PROG)
TOP = ../../..
include $(TOP)/Makefile.incl

LLIBDIR = -L$(TOOLROOT)/lib 

LLIBS = -lpthread  -lagent++ -lsnmp++ -ldes

LINCLUDES = -I$(TOOLROOT)/include/snmp++ \
        -I$(TOOLROOT)/include/agent++ 

SRCS =  sample_agent.cxx

OBJS =  sample_agent.o

depend:: $(SRCS)
        $(GENDEP) $(SRCS) >& $(DEPEND)

-include $(DEPEND)

sample_agent :: sample_agent.o $(MLIBS)
        $(LD) -o $@ sample_agent.o $(LDFLAGS) $(LIBDIR) $(LIBS)

clean::
        $(RMRF) $(OBJS) $(PROG) $(DEPEND)
#####################################


Again, this is my first encounter with Agent++ so if there are any
better examples to get me started with a simple SNMP v2 agent, or any
other documentation you have that might help I'd greatly appreciate it.

Thanks,

Nick Woods





More information about the AGENTPP mailing list