Linking C++ Functions in C

Alexandre Oliva
Tue Sep 4 19:25:00 GMT 2001

On Aug 27, 2001, Vishal Chanchalani <> wrote:

> This works fine, and links to teh c program till i do
> not use "new" in the c++ functions. The moment i use
> it, the linker gives an error for new and delete. 

> Is there any workaround for this ?

Link using g++ or explicitly link in -lstdc++, where the
implementations of new and delete are.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

More information about the Gcc-help mailing list