Vamsi Krishnam Raju D
2011-03-25 08:37:19 UTC
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
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