Hi!
I'm using make file to compile.
Please go thru the make file as shown below.





CC : = ${TOOLPATH} $(CROSS_COMPILE) gcc

NET_SNMP_VERSION = 5.1.2

PRESENT_PATH = $(shell pwd)

SNMP_PATH:= -I$(TOP_DIR)/../../../buildroot/build_armeb/net-snmp-
$(NET_SNMP_VERSION)/include

SNMP_DEP_FLAG:= -DDISABLE_TEMPLOWMARK_TRAP -DDISABLE_BBU_PRESENT_TRAP
-DDISABLE_BBU_ON_TRAP -DDISABLE_CPU_UTILIZATION_TRAP
-DDISABLE_MEMORY_UTILIZATION_TRAP

CFLAGS:= -Wno-unknown-pragmas -Wno-format -O3

OBJ_DIR = obj

OBJS = Trap.o

all: Trap install

Trap:
${CC} ${CFLAGS} ${SNMP_DEP_FLAG} ${SNMP_PATH} -c Trap.c
$(CC) $(CFLAGS) -o Trap Trap.o

install:
test -d ${TARGET_DIR}/usr/lib || mkdir -p ${TARGET_DIR}/usr/lib
cp -a Trap ${TARGET_DIR}/usr/lib/.

test -d ${TARGET_DIR}/usr/share/snmp/mibs || mkdir -p
${TARGET_DIR}/usr/share/snmp/mibs

dirclean: clean

clean:
-rm -rf core $(OBJ_DIR) *.o Trap
rm -f $(TARGET_DIR)/usr/lib/Trap


I don't know where I am doing wrong, please help me out.

With Regards,
G. Siva Prakash Reddy.


-----Original Message-----
From: dave.shield@googlemail.com [mailto:dave.shield@googlemail.com] On
Behalf Of Dave Shield
Sent: Monday, March 17, 2008 4:07 PM
To: Siva Prakash Reddy G
Cc: net-snmp-coders@lists.sourceforge.net
Subject: Re: trap error message

On 17/03/2008, Siva Prakash Reddy G wrote:
> I have written trap code, after compiling I'm getting error messages
> like as shown below.
>
> Trap.o: In function `send_ampMemUtilization_trap':
> Trap.c.text+0x80): undefined reference to

`snmp_varlist_add_variable'
> Trap.c.text+0xa4): undefined reference to

`snmp_varlist_add_variable'
> Trap.c.text+0xac): undefined reference to `send_v2trap'


[etc]

What command are you using to compile this application?

Dave

This email message and its attachments may contain CONFIDENTIAL AND PRIVILEGED INFORMATION intended for the sole use of the addressee(s). If you have received it in error, please contact the sender by return email, notify your system manager and destroy the original message and any copies thereof. Any review, use, disclosure or distribution is unlawful. Please check this email and any attachments for the presence of viruses. The Company accepts no liability for any damage caused by any virus transmitted by this email. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.
The Company reserves the right to monitor, review and store the content of all messages sent to or from this e-mail address.

www.aztecsoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders