This is a discussion on Re: Net-snmp-coders Digest, Vol 2, Issue 27 within the SNMP Coders forums, part of the Networking and Network Related category; --===============1617848767== Content-Type: multipart/alternative; boundary="----=_Part_101894_14859764.1153921334163" ------=_Part_101894_14859764.1153921334163 Content-Type: text/plain; charset=ISO-8859-1; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1617848767==
Content-Type: multipart/alternative; boundary="----=_Part_101894_14859764.1153921334163" ------=_Part_101894_14859764.1153921334163 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I have link the libraries, but the reasult is the same, and then i changed the code, gcc, the reasult is : /tmp/ccpS4oOb.o(.text+0x5a5): In function `main': : undefined reference to `init_agent' collect2: ld returned 1 exit status I don't know why, and why in the trapd receiver(snmptrapd) codes need the function init_agent()? Thank you! ************************************************** ***************** 2006/7/25, net-snmp-coders-request@lists.sourceforge.net <net-snmp-coders-request@lists.sourceforge.net >: > > Send Net-snmp-coders mailing list submissions to > net-snmp-coders@lists.sourceforge.net > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/...et-snmp-coders > or, via email, send a message with subject or body 'help' to > net-snmp-coders-request@lists.sourceforge.net > > You can reach the person managing the list at > net-snmp-coders-owner@lists.sourceforge.net > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Net-snmp-coders digest..." > > > Today's Topics: > > 1. questions about trap receiver (=?GB2312?B?0qLqxQ==?=) > 2. Re: questions about trap receiver (Dave Shield) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 24 Jul 2006 22:27:08 +0800 > From: "=?GB2312?B?0qLqxQ==?=" <yaoyu2005@gmail.com> > Subject: questions about trap receiver > To: net-snmp-coders < net-snmp-coders@lists.sourceforge.net> > Message-ID: > <2d70dd770607240727x2c4a74a3w993d1f371aedfc61@mail .gmail.com > > Content-Type: text/plain; charset="iso-8859-1" > > Hi, everyone > I am writing the trap receiver on manager, based on the net-snmp source > code > (apps/snmptrapd.c), i just modified some code, and compiled, then there > are > something wrong, > /tmp/ccgDqfDL.o(.text+0x293): In function `term_handler': > : undefined reference to `netsnmp_running' > /tmp/ccgDqfDL.o(.text+0x372): In function `pre_parse': > : undefined reference to `hosts_ctl' > /tmp/ccgDqfDL.o(.text+0x462): In function `pre_parse': > : undefined reference to `hosts_ctl' > /tmp/ccgDqfDL.o(.text+0x57a): In function `snmptrapd_add_session': > : undefined reference to `snmp_input' > /tmp/ccgDqfDL.o(.text+0x77c): In function `parse_config_logOption': > : undefined reference to `snmp_log_options' > /tmp/ccgDqfDL.o(.text+0x792): In function `parse_config_doNotFork': > : undefined reference to `netsnmp_ds_parse_boolean' > /tmp/ccgDqfDL.o(.text+0x7b7): In function > `parse_config_printEventNumbers': > : undefined reference to `netsnmp_ds_parse_boolean' > /tmp/ccgDqfDL.o(.text+0x7d8): In function > `parse_config_ignoreAuthFailure': > : undefined reference to `netsnmp_ds_parse_boolean' > /tmp/ccgDqfDL.o(.text+0x8a9): In function `main': > : undefined reference to `snmptrapd_register_configs' > /tmp/ccgDqfDL.o(.text+0x8b6): In function `main': > : undefined reference to `init_usm_conf' > /tmp/ccgDqfDL.o(.text+0xa00): In function `main': > : undefined reference to `snmp_log_syslogname' > /tmp/ccgDqfDL.o(.text+0xb55): In function `main': > : undefined reference to `init_agent' > /tmp/ccgDqfDL.o(.text+0xb76): In function `main': > : undefined reference to `free_trap1_fmt' > /tmp/ccgDqfDL.o(.text+0xb7b): In function `main': > : undefined reference to `free_trap2_fmt' > /tmp/ccgDqfDL.o(.text+0xb91): In function `main': > : undefined reference to `print_format1' > /tmp/ccgDqfDL.o(.text+0xba7): In function `main': > : undefined reference to `print_format2' > /tmp/ccgDqfDL.o(.text+0xbc0): In function `main': > : undefined reference to `netsnmp_running' > /tmp/ccgDqfDL.o(.text+0xbd7): In function `main': > : undefined reference to `netsnmp_running' > /tmp/ccgDqfDL.o(.text+0xf53): In function `main': > : undefined reference to `netsnmp_running' > /tmp/ccgDqfDL.o(.text+0xf69): In function `main': > : undefined reference to `netsnmp_logging_restart' > /tmp/ccgDqfDL.o(.text+0xf9a): In function `main': > : undefined reference to `free_trap1_fmt' > /tmp/ccgDqfDL.o(.text+0xfb0): In function `main': > : undefined reference to `print_format1' > /tmp/ccgDqfDL.o(.text+0x10bf): In function `main': > : undefined reference to `netsnmp_external_event_info' > /tmp/ccgDqfDL.o(.text+0x1130): In function `main': > : undefined reference to `netsnmp_dispatch_external_events' > /tmp/ccgDqfDL.o(.text+0x11a0): In function `main': > : undefined reference to `netsnmp_running' > /tmp/ccgDqfDL.o(.text+0x11c8): In function `main': > : undefined reference to `netsnmp_running' > collect2: ld returned 1 exit status > > I think there are some function library(.a or .so) to be linked bu I tried > some, but failed, > what is wrong? what is the reason? > Thanks very much~! > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://sourceforge.net/mailarchive/f...ttachment.html > > ------------------------------ > > Message: 2 > Date: Mon, 24 Jul 2006 15:38:44 +0100 > From: "Dave Shield" < D.T.Shield@csc.liv.ac.uk> > Subject: Re: questions about trap receiver > To: "=?GB2312?B?0qLqxQ==?=" <yaoyu2005@gmail.com > > Cc: net-snmp-coders <net-snmp-coders@lists.sourceforge.net> > Message-ID: > < c64ae3380607240738i57264099k4be126d0...il. gmail.com> > Content-Type: text/plain; charset=GB2312; format=flowed > > On 24/07/06, ???? <yaoyu2005@gmail.com> wrote: > > Hi, everyone > > I am writing the trap receiver on manager, based on the net-snmp source > code > > (apps/snmptrapd.c), i just modified some code, and compiled, then there > are > > something wrong, > [snip] > > I think there are some function library(.a or .so) to be linked bu I > tried > > some, but failed, > > The command > net-snmp-config --libs > will list the libraries that you need to use for linking > > Dave > > ------------------------------ > > ------------------------------------------------------------------------- > 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?p...rge&CID=DEVDEV > > ------------------------------ > > _______________________________________________ > Net-snmp-coders mailing list > Net-snmp-coders@lists.sourceforge.net > https://lists.sourceforge.net/lists/...et-snmp-coders > > > End of Net-snmp-coders Digest, Vol 2, Issue 27 > ********************************************** > ------=_Part_101894_14859764.1153921334163 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I have link the libraries, but the reasult is the same,<br> and then i changed the code, gcc, the reasult is :<br><br> /tmp/ccpS4oOb.o(.text+0x5a5): In function `main':<br> : undefined reference to `init_agent'<br> collect2: ld returned 1 exit status<br> <br> I don't know why, and why in the trapd receiver(snmptrapd) codes need the function init_agent()?<br>Thank you!<br><br>************************************** *****************************<br><br><div><span class="gmail_quote"> 2006/7/25, <a href="mailto:net-snmp-coders-request@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">net-snmp-coders-request@lists.sourceforge.net</a> <<a href="mailto:net-snmp-coders-request@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> net-snmp-coders-request@lists.sourceforge.net </a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send Net-snmp-coders mailing list submissions to<br> &n bsp;<a href="mailto:net-snmp-coders@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> net-snmp-coders@lists.sourceforge.net</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>   ; <a href="https://lists.sourceforge.net/lists/listinfo/net-snmp-coders" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> https://lists.sourceforge.net/lists/...et-snmp-coders </a><br>or, via email, send a message with subject or body 'help' to<br> &n bsp;<a href="mailto:net-snmp-coders-request@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">net-snmp-coders-request@lists.sourceforge.net </a><br><br>You can reach the person managing the list at <br> &nbs p;<a href="mailto:net-snmp-coders-owner@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">net-snmp-coders-owner@lists.sourceforge.net</a><br><br>When replying, please edit your Subject line so it is more specific <br>than "Re: Contents of Net-snmp-coders digest..." <br><br><br>Today's Topics:<br><br> 1. questions about trap receiver (=?GB2312?B?0qLqxQ==?=)<br> 2. Re: questions about trap receiver (Dave Shield)<br><br><br>---------------------------------------------------------------------- <br><br>Message: 1<br>Date: Mon, 24 Jul 2006 22:27:08 +0800<br>From: "=?GB2312?B?0qLqxQ==?=" <<a href="mailto:yaoyu2005@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">yaoyu2005@g mail.com </a>><br>Subject: questions about trap receiver<br>To: net-snmp-coders < <a href="mailto:net-snmp-coders@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">net-snmp-coders@lists.sourceforge.net</a>><br>Message-ID:<br> & nbsp;<<a href="mailto:2d70dd770607240727x2c4a74a3w993d1f371 aedfc61@mail.gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 2d70dd770607240727x2c4a74a3w993d1f37...il. gmail.com </a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi, everyone<br>I am writing the trap receiver on manager, based on the net-snmp source code<br>(apps/snmptrapd.c), i just modified some code, and compiled, then there are <br>something wrong,<br>/tmp/ccgDqfDL.o(.text+0x293): In function `term_handler':<br>: undefined reference to `netsnmp_running'<br>/tmp/ccgDqfDL.o(.text+0x372): In function `pre_parse':<br>: undefined reference to `hosts_ctl' <br>/tmp/ccgDqfDL.o(.text+0x462): In function `pre_parse':<br>: undefined reference to `hosts_ctl'<br>/tmp/ccgDqfDL.o(.text+0x57a): In function `snmptrapd_add_session':<br>: undefined reference to `snmp_input'<br>/tmp/ccgDqfDL.o(.text+0x77c): In function `parse_config_logOption': <br>: undefined reference to `snmp_log_options'<br>/tmp/ccgDqfDL.o(.text+0x792): In function `parse_config_doNotFork':<br>: undefined reference to `netsnmp_ds_parse_boolean'<br>/tmp/ccgDqfDL.o(.text+0x7b7): In function `parse_config_printEventNumbers': <br>: undefined reference to `netsnmp_ds_parse_boolean'<br>/tmp/ccgDqfDL.o(.text+0x7d8): In function `parse_config_ignoreAuthFailure':<br>: undefined reference to `netsnmp_ds_parse_boolean'<br>/tmp/ccgDqfDL.o(.text+0x8a9): In function `main': <br>: undefined reference to `snmptrapd_register_configs'<br>/tmp/ccgDqfDL.o(.text+0x8b6): In function `main':<br>: undefined reference to `init_usm_conf'<br>/tmp/ccgDqfDL.o(.text+0xa00): In function `main':<br>: undefined reference to `snmp_log_syslogname' <br>/tmp/ccgDqfDL.o(.text+0xb55): In function `main':<br>: undefined reference to `init_agent'<br>/tmp/ccgDqfDL.o(.text+0xb76): In function `main':<br>: undefined reference to `free_trap1_fmt'<br>/tmp/ccgDqfDL.o(.text+0xb7b): In function `main': <br>: undefined reference to `free_trap2_fmt'<br>/tmp/ccgDqfDL.o(.text+0xb91): In function `main':<br>: undefined reference to `print_format1'<br>/tmp/ccgDqfDL.o(.text+0xba7): In function `main':<br>: undefined reference to `print_format2' <br>/tmp/ccgDqfDL.o(.text+0xbc0): In function `main':<br>: undefined reference to `netsnmp_running'<br>/tmp/ccgDqfDL.o(.text+0xbd7): In function `main':<br>: undefined reference to `netsnmp_running'<br>/tmp/ccgDqfDL.o(.text+0xf53): In function `main': <br>: undefined reference to `netsnmp_running'<br>/tmp/ccgDqfDL.o(.text+0xf69): In function `main':<br>: undefined reference to `netsnmp_logging_restart'<br>/tmp/ccgDqfDL.o(.text+0xf9a): In function `main':<br>: undefined reference to `free_trap1_fmt' <br>/tmp/ccgDqfDL.o(.text+0xfb0): In function `main':<br>: undefined reference to `print_format1'<br>/tmp/ccgDqfDL.o(.text+0x10bf): In function `main':<br>: undefined reference to `netsnmp_external_event_info'<br>/tmp/ccgDqfDL.o(.text+0x1130): In function `main': <br>: undefined reference to `netsnmp_dispatch_external_events'<br>/tmp/ccgDqfDL.o(.text+0x11a0): In function `main':<br>: undefined reference to `netsnmp_running'<br>/tmp/ccgDqfDL.o(.text+0x11c8): In function `main':<br> : undefined reference to `netsnmp_running'<br>collect2: ld returned 1 exit status<br><br>I think there are some function library(.a or .so) to be linked bu I tried<br>some, but failed,<br>what is wrong? what is the reason? <br>Thanks very much~!<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders/attachments/20060724/da5708f2/attachment.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders/attachments/20060724/da5708f2/attachment.html</a><br><br>------------------------------<br><br>Message: 2<br>Date: Mon, 24 Jul 2006 15:38:44 +0100<br>From: "Dave Shield" < <a href="mailto:D.T.Shield@csc.liv.ac.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">D.T.Shield@ csc.liv.ac.uk</a>><br>Subject: Re: questions about trap receiver<br>To: "=?GB2312?B?0qLqxQ==?=" < <a href="mailto:yaoyu2005@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">yaoyu2005@g mail.com </a>><br>Cc: net-snmp-coders <<a href="mailto:net-snmp-coders@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">net-snmp-coders@lists.sourceforge.net</a>><br>Message-ID: <br> &nbs p;<<a href="mailto:c64ae3380607240738i57264099k4be126d0a 2d32274@mail.gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> c64ae3380607240738i57264099k4be126d0...il. gmail.com</a>><br>Content-Type: text/plain; charset=GB2312; format=flowed<br><br>On 24/07/06, ???? <<a href="mailto:yaoyu2005@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> yaoyu2005@gmail.com</a>> wrote: <br>> Hi, everyone<br>> I am writing the trap receiver on manager, based on the net-snmp source code<br>> (apps/snmptrapd.c), i just modified some code, and compiled, then there are<br>> something wrong,<br> [snip] <br>> I think there are some function library(.a or .so) to be linked bu I tried<br>> some, but failed,<br><br>The command<br> net-snmp-config --libs<br>will list the libraries that you need to use for linking<br> <br>Dave<br><br>------------------------------<br><br>-------------------------------------------------------------------------<br>Take Surveys. Earn Cash. Influence the Future of IT<br>Join SourceForge.net's Techsay panel and you'll get the chance to share your <br>opinions on IT & business topics through brief surveys -- and earn cash<br><a href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CI D=DEVDEV" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.techsay.com/default.php?p...amp;CID=DEVDEV </a><br><br>------------------------------<br><br>__________________________________________ _____<br>Net-snmp-coders mailing list<br><a href="mailto:Net-snmp-coders@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> Net-snmp-coders@lists.sourceforge.net </a><br><a href="https://lists.sourceforge.net/lists/listinfo/net-snmp-coders" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/net-snmp-coders</a><br><br> <br>End of Net-snmp-coders Digest, Vol 2, Issue 27<br>******************************************** ** <br></blockquote></div><br> ------=_Part_101894_14859764.1153921334163-- --===============1617848767== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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?p...rge&CID=DEVDEV --===============1617848767== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders --===============1617848767==-- |