This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

build error -- can not find operator new

Hello everyone,

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 wirtten in C++ and has C interface (extern C wrapper);
2. I have another shared called, which is written in C and is dependent on, and I am using -lA to build shared library and it is successful;
3. I have an application called C, which is written in C and is dependent on shared library, and when using -lB -lA to build the application C, here are the link error messages,

.// undefined reference to `operator new[](unsigned int)
.// undefined reference to `operator delete(void*)
.// 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 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]