Problem calling net-snmp library function from c++ application.

"Makavy, Erez (Erez)" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <AAB4B3D3CF0F454F98272CBE187FDE2F09F94228@is0004avexu1.global.avaya.com>
Hey,
 
I get this linkage error:
--------------------------------
gcc `net-snmp-config --libs` -o simpleApp simpleApp.o `net-snmp-config
--agent-libs` 
simpleApp.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0' 
collect2: ld returned 1 exit status 
make: *** [simpleApp] Error 1 
 
 
My application is a very simple test:
-----------------[simpleApp.cpp]-----------------------------------
extern "C" {
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
}
 
int main()
{
  DEBUGMSGTL(("simpleApp", "Test\n"));
return 0;
}
------------------------------------------------------------------------
-
 
 
System info:
------------------
I'm using Net-SNMP-5.2.1, and Fedora Linux 2.6.11.
using the supplied gcc 4.0.0 compiler.
 
Question :
---------------
Any idea how to solve this?
(I read that there shouldn't be a problem with c++)
 
 
 
Thanks,
Erez Makavy
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.