Fwd: about gcc -o snmpdemoapp ... -lsnmp

"Clement Hsu" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Dear Thomas and Dave:
  when I apply the Makefile supported from
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demoapp/Makefile

 and execute  make snmpdemoapp, the following error message occurring :


#make snmpdemoapp

cc     snmpdemoapp.c   -o snmpdemoapp
/tmp/ccyJBvOl.o: In function `main':snmpdemoapp.c:(.text+0x36): undefined
reference to `init_snmp'
:snmpdemoapp.c:(.text+0x44): undefined reference to `snmp_sess_init'
:snmpdemoapp.c:(.text+0xaf): undefined reference to `usmHMACMD5AuthProtocol'

:snmpdemoapp.c:(.text+0x12a): undefined reference to `generate_Ku'
:snmpdemoapp.c:(.text+0x141): undefined reference to `snmp_perror'
:snmpdemoapp.c:(.text+0x155): undefined reference to `snmp_log'
:snmpdemoapp.c: (.text+0x16f): undefined reference to `snmp_open'
:snmpdemoapp.c:(.text+0x184): undefined reference to `snmp_perror'
:snmpdemoapp.c:(.text+0x198): undefined reference to `snmp_log'
:snmpdemoapp.c:(.text+0x1b0): undefined reference to `snmp_pdu_create'
:snmpdemoapp.c:(.text+0x1d3): undefined reference to `read_objid'
:snmpdemoapp.c:(.text+0x1f2): undefined reference to `snmp_add_null_var'
:snmpdemoapp.c:(.text+0x20e): undefined reference to `snmp_synch_response'
:snmpdemoapp.c:(.text+0x259): undefined reference to `print_variable'
:snmpdemoapp.c:(.text+0x326): undefined reference to `snmp_errstring'
:snmpdemoapp.c:(.text+0x355): undefined reference to `snmp_sess_perror'
:snmpdemoapp.c:(.text+0x36d): undefined reference to `snmp_free_pdu'
:snmpdemoapp.c:(.text+0x378): undefined reference to `snmp_close'
collect2: ld returned 1 exit status
make: *** [snmpdemoapp] Error 1

do theat mean , i need to modify any factor in Makefile or there exists some

mistakes in my filesystem.  my environment is Fedora 5.0;   Thank you.


Best Regards,
Clement Hsu



Clement Hsu wrote:
> root@localhost Learning and DEMO]# gcc -o snmpdemoapp snmpdemoapp.o -lsnmp
>
> /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libsnmp.a( keytools.o): In
> function `generate_Ku': undefined reference to `EVP_md5'

Please use the Makefile we provide:

http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demoapp/Makefile


+Thomas

On 24/11/06, Thomas Anders < [email protected]> wrote:
> Clement Hsu wrote:
> > root@localhost Learning and DEMO]# gcc -o snmpdemoapp snmpdemoapp.o-lsnmp
> >
> > /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libsnmp.a( keytools.o): In
> > function `generate_Ku': undefined reference to `EVP_md5'
>
> Please use the Makefile we provide:
>
> http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demoapp/Makefile


Or at least use the full set of libraries indicated by
   net-snmp-config --libs

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
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.