[Ecls-list] ECL compiles now with C++

Juan Jose Garcia-Ripoll worm at arrakis.es
Wed Mar 3 01:44:02 UTC 2004


On Wednesday 03 March 2004 06:21, Larry Clapp wrote:
> On Mon, Mar 01, 2004 at 03:38:51PM +0100, Juan Jose Garcia-Ripoll wrote:
> > > Okay.  Recompile using -with-cxx and -with-ffi.  Will do.
> >
> > If anything fails, please report it.
>
> Well, it turns out that even with "extern "C" { ... }" around it,
> clos_ensure_class() still causes problems for g++.  I reconfigured
> with --with-cxx, and all that.  Results:

First of all, I made a mistake: the option was --enable-cxx, which has been
now conveniently renamed as --with-cxx, because the latter makes more sense
(i.e. ECL is built _with_ a C++ compiler).

Next, I had to fix several things to that the C++ compiler swallows the code
generated by ECL. One of the fixes is the one you mentioned, but I also had
to fix the macro "type_of", which confused the G++ compiler. Furthermore,
C++ is far too picky about type conversions (enumeration types have to be
explicitely converted to ints, unsigned char * -> char * does not work),
and thus the core library is still compiled with a C compiler: C++ is only
used for the lisp part and for building the library.

Please tell us if you find any further problems.

Juanjo





More information about the ecl-devel mailing list