snmptrapd compilation error

"Vamsi Krishnam Raju D" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.