This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: new operator in fopen.cxx
- From: David Oberbeck <dgo at microsynetics dot com>
- To: "'ecos-discuss at sources dot redhat dot com'" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 6 Feb 2002 10:20:37 -0700
- Subject: Re: [ECOS] new operator in fopen.cxx
- Organization: Microsynetics
- References: <AD31C7ED267AD411B55500D0B781E33D035B49FE@il33exm02.wes.mot.com>
- Reply-to: dgo at microsynetics dot com
Marty,
Hmmm - you shouldn't have to explicitly define this... we don't and are using
the new operator with gcc-3.0.3 for an ARM target.
Are you calling g++ or gcc when you compile? We invoke 'arm-elf-gcc' when
compiling C stuff, and 'arm-elf-g++' when compiling cpp things... and use
'arm-elf-gcc' when doing the final link.
Regards,
David
On Wednesday 06 February 2002 09:37, Broeske Marty-FMB223 Wrote Thusly:
> Hey,
>
> I have had errors when linking with fopen() that the new operator is not
> defined. Seaching through the source I found that in all other instances
> where new is used the operator is defined within the module (see
> mutex.cxx). I solved my problem by including the following definition in
> fopen.cxx.
>
> inline void *operator new(size_t size) { return calloc(1,size); };
>
> I really don't feel good about this. I'm not a C++ expert but shouldn't
> there be a global definition for new somewhere?
>
> So it goes...
> Marty Broeske
> mbroeske@oddparity.com
--
"Entropy Requires No Maintenance"