This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: C++ compiling problem
- To: <ecos-discuss at sources dot redhat dot com>
- Subject: RE: [ECOS] C++ compiling problem
- From: "Tony Ko" <nhko at gctsemi dot com>
- Date: Sat, 6 Oct 2001 11:14:10 +0900
Tony Ko wrote:
> > I added new file XXX.cxx , XXX.hxx to eCos-1.3.1 package.
> > but some weird compile error happened.
> > Error message shows errors happened at
> > "Install_Dir/include/lib/libkern/libkern.h ".
>
Martin wrote:
> Are you trying to use STL in your C++ code? If so, I know
> what's wrong:
>
> libkern.h declares some inline functions, one of them called min()
> (OUCH!). STL defines a template called called min() as well. If you
> include both header files, libkern.h's min() will override
> the STL one.
>
> Of course, STL then runs into problems when it actually tries
> to use its
> own version of min() but gets the wrong one (which is only
> declared but
> not defined, BTW).
>
> I already reported this problem to RedHat (we've got a support
> contract), but haven't heard anything so far. :-(
> On workaround might be to hack libkern.h to completely omit these
> functions. AFAIK, they're not used anyway.
>
> Martin
yes, right !
library overlapping was problem.
so now compiling error does not occuar at
"Install_Dir/include/lib/libkern/libkern.h"
but still has some errors while compiling.
it seems compiler cannot recognize class declaration on XXX.hxx file at
all.
but compiler compiles kernel-related XXX.hxx files well.
just new added XXX.hxx file is not compiled.
so any additional option should I add ?
thanks in advance.
Tony