Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Compiling Gambit on Windows
I am trying (without success) to compile Scheme programs using the
gambit compiler. I searched the web, and noticed that I am not the
only one who failed. The manual does not help much, since it gives
examples for Mac OS-X, and for Linux, but none for Windows. Here is
what I did:

gsc -link test.scm

This generates two files:

test.c
test_.c

I have been able to generate a test.o from these files, and  load it
from the interpreter. However, what I want is a stand alone exec file.
The manual recomends that I do the following:

gcc -L lib -lgambc test.c test_.c

I did it, but got the errors below. If anyone knows how to compile
gambit program on Windows (mingw), please, give me a hint.

D:\Gambit-C\v4.2.4>gcc -L lib -lgambc test.c test_.c
C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0x68):
undefined refe
rence to `___gstate'
C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0x94):
undefined refe
rence to `___gstate'
C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0xa9):
undefined refe
rence to `___G_display'
C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0xe2):
undefined refe
rence to `___G_display'
C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0xe8):
undefined refe
rence to `___gstate'
C:\DOCUME~1\Eduardo\CONFIG~1\Temp/cce4baaa.o:test_.c:(.text+0x52):
undefined ref
erence to `___main_char'
C:\DOCUME~1\Eduardo\CONFIG~1\Temp/cce4baaa.o:test_.c:(.data+0x0):
undefined refe
rence to `____20___gambc'
collect2: ld returned 1 exit status

I am having problems with mzscheme too. In this case, I am able to
compile the programs, but not to optimize them. Since I do not know
the optimization options, my compiled programs a terribly large, and
inefficient (from 6 to 20 times slower than Bigloo, or Stalin,
depending on the problem). From the IDE, I could not find any tool for
setting optimization options. Again, if somebody knows how to improve
the speed, and size of DrScheme programs, let me know.  Of course, my
priority is Gambit, since I heard that it is the fastest Scheme in
town (smile :-).

Report this thread to moderator Post Follow-up to this message
Old Post
phi500ac@yahoo.ca
03-28-08 09:54 AM


Re: Compiling Gambit on Windows
On Mar 28, 1:17=A0am, phi50...@yahoo.ca wrote:
> I am trying (without success) to compile Scheme programs using the
> gambit compiler. I searched the web, and noticed that I am not the
> only one who failed. The manual does not help much, since it gives
> examples for Mac OS-X, and for Linux, but none for Windows. Here is
> what I did:
>
> gsc -link test.scm
>
> This generates two files:
>
> test.c
> test_.c
>
> I have been able to generate a test.o from these files, and =A0load it
> from the interpreter. However, what I want is a stand alone exec file.
> The manual recomends that I do the following:
>
> gcc -L lib -lgambc test.c test_.c
>
> I did it, but got the errors below. If anyone knows how to compile
> gambit program on Windows (mingw), please, give me a hint.
>
> D:\Gambit-C\v4.2.4>gcc -L lib -lgambc test.c test_.c
> C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0x68):
> undefined refe
> rence to `___gstate'
> C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0x94):
> undefined refe
> rence to `___gstate'
> C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0xa9):
> undefined refe
> rence to `___G_display'
> C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0xe2):
> undefined refe
> rence to `___G_display'
> C:\DOCUME~1\Eduardo\CONFIG~1\Temp/ccSqbaaa.o:test.c:(.text+0xe8):
> undefined refe
> rence to `___gstate'
> C:\DOCUME~1\Eduardo\CONFIG~1\Temp/cce4baaa.o:test_.c:(.text+0x52):
> undefined ref
> erence to `___main_char'
> C:\DOCUME~1\Eduardo\CONFIG~1\Temp/cce4baaa.o:test_.c:(.data+0x0):
> undefined refe
> rence to `____20___gambc'
> collect2: ld returned 1 exit status
>
> I am having problems with mzscheme too. In this case, I am able to
> compile the programs, but not to optimize them. Since I do not know
> the optimization options, my compiled programs a terribly large, and
> inefficient (from 6 to 20 times slower than Bigloo, or Stalin,
> depending on the problem). From the IDE, I could not find any tool for
> setting optimization options. Again, if somebody knows how to improve
> the speed, and size of DrScheme programs, let me know. =A0Of course, my
> priority is Gambit, since I heard that it is the fastest Scheme in
> town (smile :-).

On Windows, this should work (tested with MinGW):

% gsc -link test.scm
% gcc -IC:/PROGRA~1/Gambit-C/v4.2.5/include -LC:/PROGRA~1/Gambit-C/
v4.2.5/lib -D___SINGLE_HOST test.c test_.c -lgambc -lws2_32 -o
test.exe
% test.exe

Marc


Report this thread to moderator Post Follow-up to this message
Old Post
Marc Feeley
03-29-08 03:23 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Scheme archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:25 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.