Solution for the error "multiple definition of <function>"
Lakshmi <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, When I am trying to compile the snmpusm.c file in linux device I am facing the following error. Kindly help me out. $ gcc snmpusm.c -o snmpusm -I/home/me_user/net-snmp-5.3.1/include -lnetsnmp -lcrypto -lm /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o)(.data+0x80): multiple definition of `usmAES128PrivProtocol' /tmp/ccTiH0Iv.o(.data+0x188): first defined here /usr/bin/ld: Warning: size of symbol `usmAES128PrivProtocol' changed from 4 in /tmp/ccTiH0Iv.o to 40 in /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o) /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o)(.data+0xc0): multiple definition of `usmDESPrivProtocol' /tmp/ccTiH0Iv.o(.data+0x120): first defined here /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o)(.data+0x100): multiple definition of `usmNoPrivProtocol' /tmp/ccTiH0Iv.o(.data+0xe0): first defined here /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o)(.data+0x140): multiple definition of `usmHMACSHA1AuthProtocol' /tmp/ccTiH0Iv.o(.data+0xa0): first defined here /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o)(.data+0x180): multiple definition of `usmHMACMD5AuthProtocol' /tmp/ccTiH0Iv.o(.data+0x60): first defined here /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o)(.data+0x1c0): multiple definition of `usmNoAuthProtocol' /tmp/ccTiH0Iv.o(.data+0x20): first defined here /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o)(.text+0x0): In function `usm_malloc_usmStateReference': : multiple definition of `usm_malloc_usmStateReference' /tmp/ccTiH0Iv.o(.text+0x0): first defined here /usr/bin/ld: Warning: size of symbol `usm_malloc_usmStateReference' changed from 29 in /tmp/ccTiH0Iv.o to 44 in /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libnetsnmp.a(snmpusm.o) /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crt1.o(.text+0x18): In function `_start': : undefined reference to `main' collect2: ld returned 1 exit status -- Regards & Thanks, nagalav ------------------------------------------------------------------------- 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-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