Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

snmptrapd compilation error

65 views
Skip to first unread message

Vamsi Krishnam Raju D

unread,
Mar 25, 2011, 4:37:19 AM3/25/11
to
Hi...
Iam using net-snmp c-api to receive traps. Iam using the sample
snmptrapd.c file. When I compiled the file using "gcc `net-snmp-config
--cflags --agent-libs --libs` -lnetsnmptrapd snmptrapd.c" it is compiled and
working fine. When I use g++ instead of gcc then it is throwing the following
errors

/tmp/ccuc9yQ7.o: In function `trapd_update_config()':
snmptrapd.c:1320: undefined reference to `vacm_standard_views(int, int, void*,
void*)'
/tmp/ccuc9yQ7.o: In function `main':
snmptrapd.c:621: undefined reference to `snmptrapd_register_configs()'
snmptrapd.c:948: undefined reference to `print_handler(snmp_pdu*,
netsnmp_transport_s*, netsnmp_trapd_handler_s*)'
snmptrapd.c:948: undefined reference to `netsnmp_add_global_traphandler(int,
int (*)(snmp_pdu*, netsnmp_transport_s*, netsnmp_trapd_handler_s*))'
snmptrapd.c:1014: undefined reference to `init_netsnmp_trapd_auth()'
snmptrapd.c:1059: undefined reference to `parse_format(char const*, char*)'
/tmp/ccuc9yQ7.o: In function `snmptrapd_add_session':
snmptrapd.c:401: undefined reference to `snmp_input(int, snmp_session*, int,
snmp_pdu*, void*)'
/tmp/ccuc9yQ7.o: In function `main':
snmptrapd.c:943: undefined reference to `syslog_handler(snmp_pdu*,
netsnmp_transport_s*, netsnmp_trapd_handler_s*)'
snmptrapd.c:943: undefined reference to `netsnmp_add_global_traphandler(int,
int (*)(snmp_pdu*, netsnmp_transport_s*, netsnmp_trapd_handler_s*))'
snmptrapd.c:1243: undefined reference to `parse_format(char const*, char*)'
collect2: ld returned 1 exit status

I need to use g++ compiler only for my project.
Pls provide me the solution ..


Regards..
Vamsi Krshnam Raju.D
NMS Group,C-DOTB


------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

rohini...@gmail.com

unread,
Aug 1, 2020, 10:56:28 AM8/1/20
to
hi
0 new messages