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, [EMAIL PROTECTED] <
[EMAIL PROTECTED]
>:
Send Net-snmp-coders mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
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==?=" <[EMAIL PROTECTED] >
Subject: questions about trap receiver
To: net-snmp-coders < [email protected]>
Message-ID:
< [EMAIL PROTECTED] >
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/forum.php?forum=net-snmp-coders/attachments/20060724/da5708f2/attachment.html
------------------------------
Message: 2
Date: Mon, 24 Jul 2006 15:38:44 +0100
From: "Dave Shield" < [EMAIL PROTECTED]>
Subject: Re: questions about trap receiver
To: "=?GB2312?B?0qLqxQ==?=" < [EMAIL PROTECTED] >
Cc: net-snmp-coders <[email protected]>
Message-ID:
< [EMAIL PROTECTED]>
Content-Type: text/plain; charset=GB2312; format=flowed
On 24/07/06, ???? < [EMAIL PROTECTED]> 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?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
End of Net-snmp-coders Digest, Vol 2, Issue 27
**********************************************
------------------------------------------------------------------------- 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-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
