[Ecls-list] win32 compilation error

Marko Kocić marko.kocic at gmail.com
Fri Mar 24 01:28:06 UTC 2006


Ok, I found out what was wrong with MCW_EM. Seems I had both gcc
3.4 and 4.1 include files so gcc made a mess. I cleaned all old
gcc files and I now have the following error.

gcc -c -I. -I/c/dev/cvstree/ecl/ecl/build
-I/c/dev/cvstree/ecl/ecl/src/c -I../ecl/gc  -g -O2 -D_THREAD_SAFE
--fstrict-aliasing -Dmingw32  -o package.o package.c
c:/dev/cvstree/ecl/ecl/src/c/package.d: In function 'cl_make_package':
c:/dev/cvstree/ecl/ecl/src/c/package.d:725: error: initializer element
is not constant
c:/dev/cvstree/ecl/ecl/src/c/package.d:725: error: (near
initialization for 'KEYS[0]')
c:/dev/cvstree/ecl/ecl/src/c/package.d:725: error: initializer element
is not constant
c:/dev/cvstree/ecl/ecl/src/c/package.d:725: error: (near
initialization for 'KEYS[1]')
make[2]: *** [package.o] Error 1

When I look at the generated c source code line that fails looks like this:
static cl_object KEYS[2] =
{(cl_object)(cl_symbols+1270),(cl_object)(cl_symbols+1314)};

When I changed that line manually to:
    static cl_object KEYS[2];
    KEYS[0] = (cl_object)(cl_symbols+1270);
    KEYS[1] = (cl_object)(cl_symbols+1314);
then package compiles, but I get the similar errors in list.d.
Seems that gcc 4.1 is more strict about static array initializers then
3.4 series.

Could someone else check with gcc 4.1 under Linux, just to make sure
this is not just me.

Regards,
Marko


More information about the ecl-devel mailing list