This is the mail archive of the
mailing list for the GCC project.
build error -- can not find operator new
- From: Lin George <george4academic at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 5 Nov 2007 01:49:54 -0800 (PST)
- Subject: build error -- can not find operator new
I am using Red Hat Enterprise Linux 4 with gcc version 3.4.5. Here is my issue,
1. I have a shared library called libA.so wirtten in C++ and has C interface (extern C wrapper);
2. I have another shared called libB.so, which is written in C and is dependent on libA.so, and I am using -lA to build shared library libB.so and it is successful;
3. I have an application called C, which is written in C and is dependent on shared library libB.so, and when using -lB -lA to build the application C, here are the link error messages,
.//libA.so: undefined reference to `operator new(unsigned int)
.//libA.so: undefined reference to `operator delete(void*)
.//libA.so: undefined reference to `__gxx_personality_v0
For the whole process, I am using gcc other than g++. And I am wondering how to solve this issue in step 3?
I think we are able to build C application with dependent C++ shared library, right?
thanks in advance,
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around