[plt-scheme] New language plugin: sPico

From: Daniel Silva (daniel.silva at gmail.com)
Date: Sun Nov 21 13:58:43 EST 2004

Can you show us your full command line?  The MinGW says its gcc
release should work like the official gcc releases.

My MzScheme extension Makefiles start with:

MZC=mzc
GCC=/usr/bin/gcc
CC=$(MZC)
CFLAGS=++ccf -g ++ccf -fPIC --cc
LIBS=++ldf -lpthread ++ldf -lutil

.c.o:
        $(CC) -d `dirname $@` $(CFLAGS) $<

To compile all the objects, and then to link them as a dynamic library:

ALLOBJS= some-obj.o another-obj.o

my-extension.so: $(ALLOBJS)
        $(MZC) -v --linker $(GCC) --ld my-extension.so ++ldf -g ++ldf
-fPIC  $(LIBS) --ldf-show --ldl-show $(ALLOBJS)


In Windows I guess ".o" is replaced by ".obj" and if you keep getting
those errors, try adding "++ccf -lgcc" to the beginning of the CFLAGS
for mzc.

Daniel

On Sun, 21 Nov 2004 14:15:47 +0100, camden at camden.be <camden at camden.be> wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> I have some questions about compiling the c-sources through
> mzc, against the scheme-headers:
> How do I do this, and is there a small tutorial online perhaps?
> (have not found one yet, which covers all the holes)
> I've tried to compile with MinGW; but I always get a lot of errors
> like this:
> 
> spico.obj(.text+0x7c2):spico.c: undefined reference to `sprintf'
> spico.obj(.text+0x87c):spico.c: undefined reference to `free'
> spico.obj(.text+0x95d):spico.c: undefined reference to `malloc'
> spico.obj(.text+0x306):spico.c: undefined reference to `strcpy'
> spico.obj(.text+0x517):spico.c: undefined reference to `fclose'
> 
> I now these aren't scheme-errors, but maybe anyone of you knows
> what my problem is...
> 
> It would be cool if I could make it work under windows, because
> there are classes given in pico; in linux or windows (whatever
> you want :). And crossplatform software would be great.
> Building under mac was already successfull so I've heard.
> 
> If any of you wants to try a compile out... (or just the language
> itself in linux) :ftp://cutie.rave.org
> 
> greetz.
> toon
> 
> PS: I don't have a commercial compiler ofcourse, online the standard
> gcc etc...
> 
> On (20/11/04 10:21), Robby Findler wrote:
> From: Robby Findler <robby at cs.uchicago.edu>
> To: Kim Gybels <kgybels at vub.ac.be>
> Cc: plt-scheme at list.cs.brown.edu
> Subject: Re: [plt-scheme] New language plugin: sPico
> Date: Sat, 20 Nov 2004 10:21:48 -0600
> 
> 
> 
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> On Nov 20, 2004, at 9:07 AM, Kim Gybels wrote:
> 
> >Just one other thing I was wondering:
> >is it possible to display an icon where the gc-collect icon is usually
> >displayed. We need this because the Pico-vm also does garbage
> >collects, and we want to show this by using a different gc-icon :)
> 
> You cannot replace that icon without changing the existing source, but
> you can add one next to it. See the docs for frame:info in the
> framework (let me know if you get stuck).
> 
> Robby
>


Posted on the users mailing list.