This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Linking C++ Functions in C
- To: Vishal Chanchalani <gccmailinglistid at yahoo dot com>
- Subject: Re: Linking C++ Functions in C
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 04 Sep 2001 20:04:13 -0300
- Cc: gcc-help at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20010827080239.58982.qmail@web20203.mail.yahoo.com>
On Aug 27, 2001, Vishal Chanchalani <gccmailinglistid@yahoo.com> 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 http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me