example program does not compile

"Devvrat Tripathi" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I just installed the net-snmp package. Since this is the first time i am
using this package i tried to run the example program given at the net snmp
site. When i run the makefile provided at the site i get the following
error.

gcc -I. `/usr/local/bin/net-snmp-config --cflags`    test1.c   -o test1
/tmp/ccyFZv5W.o: In function `main':
/home/devvrat/test1.c:31: undefined reference to `init_snmp'
/home/devvrat/test1.c:36: undefined reference to `snmp_sess_init'
/home/devvrat/test1.c:56: undefined reference to `usmHMACMD5AuthProtocol'
/home/devvrat/test1.c:63: undefined reference to `usmHMACMD5AuthProtocol'
/home/devvrat/test1.c:63: undefined reference to `generate_Ku'
/home/devvrat/test1.c:89: undefined reference to `snmp_open'
/home/devvrat/test1.c:101: undefined reference to `snmp_pdu_create'
/home/devvrat/test1.c:102: undefined reference to `snmp_parse_oid'
/home/devvrat/test1.c:113: undefined reference to `snmp_add_null_var'
/home/devvrat/test1.c:118: undefined reference to `snmp_synch_response'
/home/devvrat/test1.c:155: undefined reference to `snmp_sess_perror'
/home/devvrat/test1.c:165: undefined reference to `snmp_free_pdu'
/home/devvrat/test1.c:166: undefined reference to `snmp_close'
/home/devvrat/test1.c:129: undefined reference to `print_variable'
/home/devvrat/test1.c:149: undefined reference to `snmp_errstring'
/home/devvrat/test1.c:68: undefined reference to `snmp_perror'
/home/devvrat/test1.c:69: undefined reference to `snmp_log'
/home/devvrat/test1.c:103: undefined reference to `snmp_perror'
/home/devvrat/test1.c:92: undefined reference to `snmp_sess_perror'
collect2: ld returned 1 exit status
make: *** [test1] Error 1

I have checked /usr/local/net-snmp-config --libs and -lnetsnmp is present in
it. I do not know why it is still not able to find the above function
definitions. It would be a great help if someone can point out the problem.

best regards

Devvrat

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.