Building Slate VM with LCC-Win32 under Windows XP (was: 0.3 Updates)

Massimo Dentico m.dentico at virgilio.it
Sun Jul 18 16:46:48 PDT 2004


Brian Rice wrote:
> 
> On Jul 18, 2004, at 11:02 AM, Jaco van der Merwe wrote:
>
> > ...
> > My first attempt to compile and run Slate on Windows was by using 
> > MINGW 3.2 (as embedded in Dev-C++ 4.9.8.0). The sources compiled
> > without problems, but when I ran the executable it crashed soon
> > ...

Yes. Exactly the same here, even after manual Mingw updating (to GCC 3.3.1).
But I successfully compiled, after a couple of simple source patching
suggested by Lee, with LCC-Win32:

   http://www.cs.virginia.edu/~lcc-win32/


> > The VC compiler also choked on the definition of the following two 
> > structs:
> >
> > struct RoleTable {
> >   struct ObjectHeader header;
> >   struct Map * map;
> >   ObjectPointer traits;
> >   ObjectPointer elements[0];
> >   struct RoleEntry roles[0];
> > };
> >
> > struct SlotTable {
> >   struct ObjectHeader header;
> >   struct Map * map;
> >   ObjectPointer traits;
> >   ObjectPointer elements[0];
> >   struct SlotEntry slots[0];
> > };
> >
> > ...
>
> Okay, this is definitely a weird little case, and I'm not sure of the 
> answer. Maybe Lee has something to add here.

These are the only errors with LCC-Win32, the rest are warnings.
Lee suggested (see IRC log, starting from  17:26:55, here
   http://tunes.org/~coreyr/read.php?chan=slate&date=04.07.17):

17:28:20 <novo> umm
17:28:23 <novo> that shouldn't even be there
17:28:48 <MaD70> so an error during generation?
17:29:18 <novo> delete the elements[0] lines for those two
17:29:24 <MaD70> ok

Lee is <novo> and <MaD70> is me. Then it compiled and ran fine
it seems (I have not extensively tested it yet).

I build it with:

   <install dir>\lcc\bin\lc.exe -ansic -errout=Slate.err *.c -o Slate.exe

in a directory containing these files:

 * from http://slate.tunes.org/downloads/alpha/

     vm.h
     vm.c
     little.image


 * in http://slate.tunes.org/downloads/slate-current.tar.gz
   from slate-current\bootstrap\mobius\vm
 * or in CVS (via ViewCVS here
     http://slate.tunes.org/cgi-bin/viewcvs.cgi/slate/src/mobius/vm/)
   from slate/src/mobius/vm

     file.h
     image.h
     boot.c
     file.c


I hope that this helps.
Regards.

--
Massimo Dentico








More information about the Slate mailing list