Discussion:
snmptrapd compilation error
(too old to reply)
Vamsi Krishnam Raju D
2011-03-25 08:37:19 UTC
Permalink
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
r***@gmail.com
2020-08-01 14:56:26 UTC
Permalink
Post by Vamsi Krishnam Raju D
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
snmptrapd.c:1320: undefined reference to `vacm_standard_views(int, int, void*,
void*)'
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*)'
snmptrapd.c:401: undefined reference to `snmp_input(int, snmp_session*, int,
snmp_pdu*, void*)'
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
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
hi

Loading...