Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2016-01-13 | 22.3 kB | |
Totals: 1 Item | 22.3 kB | 0 |
Currently only the gcc4.9 version of msys2 can compile gcl and thus the gcl version. So I made shure that you can reproduce it. Build system also builds all needed files for 64 bit but gcl does stop with assertion. The build system could be also usefull eg. for compiling a 64 bit version with sbcl. So I left in comments for compiling all libraries for 64 bit.
versions used
"C:\msys32\home\test\maxima-5.37.3.tar.gz"
"C:\msys32\home\test\wxmaxima-15.08.2.tar.gz"
"C:\msys32\home\test\wxWidgets-3.0.2.tar.bz2"
"C:\msys32\home\test\gcl-2.6.11.tar.gz"
note: do use msys2_64 bit install for 64 bit compilations otherwise use msys2_32
get msys2
Compiling linux applications under windows.
1) Inpstalling msys2 (point 1 and 2 are summarized from the msys2 installation instructions)
You need msys and mingw. Msys is needed to get a linux like shell.
And mingw is needed to get the compilersuite.
There is a newer version with more up to date files called msys2, which I can recommend.
These instructions are for setting up a fully functional mingw32 or mingw64 environment with msys2.
First you need to download msys2 from:
http://sourceforge.net/projects/msys2/files/Base/i686/msys2-i686-20150916.exe/download
or any newer version.
After download go into the folder C:\msys32\etc\pacman.d
and change mirrorlist.msys into:
##
## MSYS2 repository mirrorlist
##
## Primary
## msys2.org
#Server = http://repo.msys2.org/msys/$arch
Server = http://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/$arch
Server = http://www2.futureware.at/~nickoe/msys2-mirror/msys/$arch/
change the file: mirrorlist.mingw32 into:
##
## 32-bit Mingw-w64 repository mirrorlist
##
## Primary
## msys2.org
Server = http://sourceforge.net/projects/msys2/files/REPOS/MINGW_GCC_4_9/i686/
#Server = http://repo.msys2.org/mingw/i686
#Server = http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686
Server = http://www2.futureware.at/~nickoe/msys2-mirror/i686/
change the file: mirrorlist.ming64 into:
##
## 64-bit Mingw-w64 repository mirrorlist
##
## Primary
## msys2.org
#Server = http://repo.msys2.org/mingw/x86_64
Server = http://sourceforge.net/projects/msys2/files/REPOS/MINGW_GCC_4_9/x86_64
#Server = http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64
Server = http://www2.futureware.at/~nickoe/msys2-mirror/x86_64/
There is a 32 bit and a 64 bit version of msys2. Both are able to compile with mingw32 and ming64
but I recomment installing 32bit msys2 to compile with ming32 and installing 64 bit msys2
for compiling with ming64.
64bit:
http://sourceforge.net/projects/msys2/files/Base/x86_64/
2) Updating msys2
Once installed (do not install to places where there are spaces in the path) open with explorer
e.g.:
c:\msys32\
or
c:\msys64\
Msys emulating the fork system call under linux by using the same addresses spaces for all dlls but therefore all addresses need to be adjusted before, so first call:
autorebase.bat
Then open msys2_shell.bat for only the next steps (later you will use mingw32_shell for 32 bit
compilations and mingw64_shell for 64 bit compilations).
Do this first with msys2_shell.bat especially when using old package
Now synchronize your local package databases with the latest repositories by typing (the $ is the command propmt):
$pacman -Sy
(do not use "pacman -Syu", which would update everything in a single run but then the system would become unstable because you need to call autorebase in between see below)
Update the core programs first:
$pacman -S --needed filesystem msys2-runtime bash libreadline libiconv libarchive libgpgme libcurl pacman ncurses libintl
If any of these files get updated then exit msys and call autorebase.bat and start msys2_shell.bat again and update the rest:
$pacman -Su
if you get timeoutproblems then remove sources from files in
/etc/pacman.d/
Now close msys2_shell and open mingw32_shell.bat or mingw64_shell.bat depending if you want to compile for 32 or 64 bit:
now use mingw32_shell.bat or mingw64_shell.bat
do for 64bit:
pacman -S autoconf autogen automake automake-wrapper diffutils \
msys2-w32api-headers msys2-w32api-runtime \
guile libgc libguile libltdl libunistring make \
mingw-w64-x86_64-toolchain \
mingw-w64-x86_64-tcl \
mingw-w64-x86_64-tk \
mingw-w64-x86_64-make mingw-w64-x86_64-libtool \
mingw-w64-x86_64-binutils mingw-w64-x86_64-bzip2 \
mingw-w64-x86_64-cairo mingw-w64-x86_64-cloog \
mingw-w64-x86_64-crt-git mingw-w64-x86_64-dbus \
mingw-w64-x86_64-expat mingw-w64-x86_64-fontconfig \
mingw-w64-x86_64-freetype mingw-w64-x86_64-gcc \
mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-gdk-pixbuf2 \
mingw-w64-x86_64-gettext mingw-w64-x86_64-giflib \
mingw-w64-x86_64-glib2 mingw-w64-x86_64-gmp \
mingw-w64-x86_64-gnutls mingw-w64-x86_64-harfbuzz \
mingw-w64-x86_64-headers-git mingw-w64-x86_64-isl \
mingw-w64-x86_64-libcroco mingw-w64-x86_64-libffi \
mingw-w64-x86_64-libiconv mingw-w64-x86_64-libjpeg-turbo \
mingw-w64-x86_64-libpng mingw-w64-x86_64-librsvg \
mingw-w64-x86_64-libtiff mingw-w64-x86_64-libwinpthread-git \
mingw-w64-x86_64-libxml2 mingw-w64-x86_64-mpc \
mingw-w64-x86_64-mpfr mingw-w64-x86_64-pango \
mingw-w64-x86_64-pixman mingw-w64-x86_64-winpthreads \
mingw-w64-x86_64-xpm-nox mingw-w64-x86_64-xz \
mingw-w64-x86_64-zlib tar gcc texinfo
do for 32 bit:
pacman -S autoconf autogen automake automake-wrapper diffutils \
guile libgc libguile libltdl libunistring make \
msys2-w32api-headers msys2-w32api-runtime mingw-w64-i686-headers-git \
mingw-w64-i686-toolchain \
mingw-w64-i686-tcl \
mingw-w64-i686-tk \
mingw-w64-i686-make mingw-w64-i686-libtool \
mingw-w64-i686-binutils mingw-w64-i686-bzip2 \
mingw-w64-i686-cairo mingw-w64-i686-cloog \
mingw-w64-i686-crt-git mingw-w64-i686-dbus \
mingw-w64-i686-expat mingw-w64-i686-fontconfig \
mingw-w64-i686-freetype mingw-w64-i686-gcc \
mingw-w64-i686-gcc-libs mingw-w64-i686-gdk-pixbuf2 \
mingw-w64-i686-gettext mingw-w64-i686-giflib \
mingw-w64-i686-glib2 mingw-w64-i686-gmp \
mingw-w64-i686-gnutls mingw-w64-i686-harfbuzz \
mingw-w64-i686-headers-git mingw-w64-i686-isl \
mingw-w64-i686-libcroco mingw-w64-i686-libffi \
mingw-w64-i686-libiconv mingw-w64-i686-libjpeg-turbo \
mingw-w64-i686-libpng mingw-w64-i686-librsvg \
mingw-w64-i686-libtiff mingw-w64-i686-libwinpthread-git \
mingw-w64-i686-libxml2 mingw-w64-i686-mpc \
mingw-w64-i686-mpfr mingw-w64-i686-pango \
mingw-w64-i686-pixman mingw-w64-i686-winpthreads \
mingw-w64-i686-xpm-nox mingw-w64-i686-xz \
mingw-w64-i686-zlib tar gcc texinfo
If you get an error stating that mingw-w64-i686-cloog is missing then you
might have forgotten to change the mirrorlist to the gcc4.9 sources.
If you are searching for packages use pacman -Ss >name_pattern>
If you do run into failures to run post-install scripts, then make a list of all the packages that failed to install correctly,
exit all your MSYS2 shells (make sure that they fully exit and no mintty/bash processes are running).
Then launch a new MSYS2 shell, and issue: pacman -S <list-of-packages-that-failed-to-install>
exit mingw shell call autorebase and open the shell again.
3) compiling gcl: only works in 2014 version of mingw32 only in 32 bit
32 bit:
grab gcl-2.6.11.tar.gz and unpack
copy C:\msys32\mingw32\i686-w64-mingw32\include\malloc.h into alloca.h
in gcl/h/include.h
add:
#ifdef _WIN32
typedef int sigset_t;
//typedef int sigset_t;
#endif
in protoize.h comment out
//void *
//alloca(size_t);
in gcl source dir:
$./configure --enable-ansi
$make
$make install
Check that gcl works by typing gcl at MSYS command line
$ gcl
(+ 1 2 3)
6
(quit)
64 bit:
better grab gcl-2.6.11.tar.gz and unpack
copy C:\msys64\mingw64\x86_64-w64-mingw32\include\malloc.h into alloca.h
in h/include.h
add at line 38:
typedef unsigned int sigset_t;
in protoize.h comment out
//void *
//alloca(size_t);
[64bitonly has error] for 64bit additionally edit configure.in (line 1334) and configure (line 6612)
#include "pwd
/h/object.h"
#include "pwd
/h/enum.h"
#include "pwd
/h/type.h"
#include "pwd
/h/lu.h"
#include "pwd
/h/object.h"
and change into
#include "./h/enum.h"
#include "./h/type.h"
#include "./h/lu.h"
#include "./h/object.h"
copy msys64/usr/lib/w32api to /msys64/mingw64/lib
copy msys64/usr/include/w32api to /msys64/mingw64/include
in gcl source dir:
$./configure --enable-ansi --enable-machine=mingw
$make
currently you will get an error due to an assertion in sfaslcoff.c.
This is an object loader which currently can only handle 32 bit object files.
the problem occurs in sfaslcoff.c line 245
massert(h->h_magic==0x10b || h->h_magic==0x20b);
massert(h->h_magic==0x10b || !h->h_dbase); /We cannot handle a 64bit load address/
I hope anybody can fix this.
[end of 64bitonly]
$make install
if you get address errors then close mingw call autorebase from explorer
make install
Check that gcl works by typing gcl at MSYS command line
$ gcl
GCL (GNU Common Lisp) 2.6.8 ANSI Nov 11 2006 23:08:49
Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
Binary License: GPL due to GPL'ed components: (UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter
Use (help) to get some basic information on how to use GCL.
Temporary directory for compiler files set to C:/DOCUME~1/user/LOCALS~1/Temp/
(quit)
Maxima can now be built under Windows without recourse to any
Unix-like utilities. To do so, follow the purely lisp-based build
procedure in INSTALL.lisp.
From early 2012 it has been possible to build maxima using current
msys, mingw and gcc-4.6.
2) Get a working GCL (see above)
3) Get and install TclKit and Starkit sdx from http://www.equi4.com.
Download sdx.bat and sdx.kit from http://www.equi4.com/pub/sk/.
Download tclkit-win32.upx.exe and tclkitsh-win32.upx.exe from
http://www.equi4.com/pub/tk/8.5.2/.
Install the following four files
sdx.bat sdx.kit tclkit-win32.upx.exe tclkitsh-win32.upx.exe
in your MSYS user home directory in ~/programs/star
rename them to tclkit.exe and tclkitsh.exe
copy all files to mingw/bin
Download img.kit from http://www.tcl.tk/starkits/ and put it in
~/programs/star
6) Get and install Inno Setup from
http://www.jrsoftware.org/isinfo.php.
7) Download the gnuplot windows binary from http://gnuplot.sourceforge.net.
It is recomended to use version 4.6 patchlevel 3 or more recent (If you
do have to use an older version, read the Maxima documentation for variable
gnuplot_view_args).
Install gnuplot in your MSYS user home directory in ~/programs/gnuplot
8) Compile wxMaxima for windows from http://wxmaxima.sourceforge.net. only works with 2016 version of msys2
Use wxMaxima 0.6.5 with Maxima 5.9.3 or earlier,
wxMaxima 0.7.0 with Maxima 5.10.0,
and wxMaxima 0.7.1 with Maxima 5.11.0.
install wxwidgets 3.0.2
unzip
mkdir build1
cd build1
../configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --enable-static --disable-shared --disable-debug --enable-unicode --disable-precomp-headers
export "CXXFLAGS=-fpermissive -std=gnu++11 -Wl,-Bstatic"
make -j8 && make install
64bitonly: export "CXXFLAGS=-fpermissive -std=gnu++11 -Wl,-Bstatic"
64bitonly: ../configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --enable-static --disable-shared --disable-debug --enable-unicode --disable-precomp-headers
64bitonly: make -j8 && make install
http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw64_how_to.html
https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW
64bitonly: now search for any occurrenct of the string: --define __WIN32__ --define __WIN95__ --define __GNUWIN32__
and replace the above value with: --define WX_CPU_AMD64
(this is required so to create 64 bit resource files)
cd /utils
in wxMaxima dir
ATTENTION: replace /home/k with your user folder
./configure CXXFLAGS='-DNDEBUG' --prefix=/home/k/programs/wxMaxima
64bitonly: export "CXX=x86_64-w64-mingw32-g++"
64bitonly: export "CXXFLAGS=-O2 -fno-strict-aliasing -fpermissive -std=gnu++11 -static-libgcc -DNDEBUG -Wl,-Bstatic"
64bitonly: ./configure --prefix=/home/k/programs/wxMaxima
cp -r /usr/local/include/wx-3.0/wx/ /usr/local/include/
convert C:\MinGW\msys\1.0\home\k\maxima\wxmaxima-14.09.0\art\.icns into .ico format with webconverter iconvert
make -j8
make install
NOTE: Location of Starkit/TclKit, gnuplot and wxMaxima is controlled
by the override-able variables and their defaults are:
TCLKITSH = tclkitsh.exe
TCLKITDIR = ../../../../programs/star
SDXDIR = $(TCLKITDIR)
GCCPREFIX=/mingw
GNUPLOTDIR = ../../../../programs/gnuplot
WXMAXIMADIR = ../../../../programs/wxMaxima
To see how they are used, look in interfaces/xmaxima/win32/Makefile.in
and Makefile.am in the top level maxima directory. You may change
their values according to your preferences.
9) Get Microsoft HTML Help Workshop from
http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en
and install it.
Make sure that HHW directory is within PATH (edit PATH environment
variable with either Windows or MSYS approach), so the HTML Help Workshop
compiler command "hhc.exe" is available at the MSYS command prompt.
KS: C:\Program Files (x86)\HTML Help Workshop
For reference, to change PATH within MSYS only, edit the file
c:\msys\1.0\etc\profile and add the following line after the initial
setting of PATH:
export PATH="/c/gcl/bin:$PATH"
istall perl and python with pacman -S ...
11) Following components
a) tcltk (e.g. wish84 command), add to path:C:\Tcl\bin
b) gcl (gcl command),
c) HTML Help Workshop compiler (hhc command) add to path: C:\Program Files (x86)\HTML Help Workshop
d) perl
e) python
should also be available at the MSYS command prompt.
If this is not the case, edit your PATH variable or add wrapper scripts.
m
12) You should now be ready to compile and install maxima.
Configure maxima so that it will install in some sort of temporary
directory. The directory does not need to exist ahead of time.
copy files from ~/programs to /c/programs
rm -rf /c/programs
mkdir /c/programs
cp -rf ~/programs /c/
copy c:/tcl/tclkit-8.6.3-win32-ix86.exe to /c/programs/star
copy c:/tcl/tclkitsh-8.6.3-win32-ix86.exe to /c/programs/star
http://tclkits.rkeene.org/fossil/wiki?name=Downloads
install http://www.tcl.tk/software/tcltk/8.5.html to /c/tcl/
take care that tcl is written with small letters.
./configure --prefix=c:/maxima --enable-gcl --enable-chm --enable-xmaxima-exe \
--with-hhc="C:\Program Files (x86)\HTML Help Workshop\hhc.exe" --enable-lang-es --enable-lang-pt --enable-lang-pt_BR
in 5.37.3 we have to set the right gnuplot path. do so in
/src/plot.lisp
#line 91
(defvar $gnuplot_command (if (string= autoconf-win32 "true")
"..\\gnuplot\\bin\\wgnuplot"
note: make clean distclean does not work, you need to erase the directory and untar it again.
make
press 1 3 4
make
make check
The "check" should pass all tests except those listed as known
failures.
edit interfaces/xmaxima/Makefile.in
line (400 in maxima-5.34.1) (500 in version 5.37.3 ) from:
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
into
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || echo "xxx" $$?; \
call twice:
make install
because iss makefile is old we first some directory fixes
####################################
mkdir /mingw
mkdir /mingw/bin
mkdir /mingw/include
echo "null" > /mingw/bin/mingwm10.dll
echo "null" > /mingw/bin/libmpc-3.dll
echo "null" > /mingw/bin/libmpfr-4.dll
cp /mingw32/i686-w64-mingw32/include/stdio.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/stdlib.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/setjmp.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/_mingw.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/math.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/io.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/process.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/getopt.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/stdint.h /mingw/include
cp /mingw32/i686-w64-mingw32/include/unistd.h /mingw/include
mkdir /mingw/include/sys
cp /mingw32/i686-w64-mingw32/include/sys/*.* /mingw/include/sys
mkdir /mingw/libexec/
mkdir -p /mingw/libexec/gcc/mingw32/4.9.2
cp /mingw32/lib/gcc/i686-w64-mingw32/4.9.2/cc1.exe /mingw/libexec/gcc/mingw32/4.9.2
cp /mingw32/lib/gcc/i686-w64-mingw32/4.9.2/liblto_plugin-0.dll /mingw/libexec/gcc/mingw32/4.9.2
mkdir -p /mingw/lib/gcc/mingw32/4.9.2/include
cp -r /mingw32/lib/gcc/i686-w64-mingw32/4.9.2/include/* /mingw/lib/gcc/mingw32/4.9.2/include
cp /usr/bin/i686-pc-msys-gcc.exe /mingw/bin/gcc.exe
cp /mingw32/bin/libgmp-10.dll /mingw/bin
cp /mingw32/i686-w64-mingw32/bin/as.exe /mingw/bin/
#get tclpip85.dll from a phython27 install
cp /c/Python27/DLLs/tclpip85.dll /c/tcl/bin/
##############################################################
make iss
#cp ~/maxima-5.37.3/interfaces/xmaxima/win32/readme*.txt /c/maxima
#we need to get
cp -r ~/wxmaxima-15.08.2/art/ /c/maxima/wxMaxima
cp -r ~/wxmaxima-15.08.2/data/ /c/maxima/wxMaxima
#ignore copy c:\maxima\wxMaxima\bin\wxmaxima.exe to c:\maxima\wxMaxima
cp /c/maxima/wxMaxima/bin/ /c/maxima/wxMaxima/
cp -r /c/maxima/wxMaxima/share/ /c/maxima/wxMaxima/
rm -rf /c/maxima/wxMaxima/bin
rm -rf /c/maxima/wxMaxima/share
cp /mingw32/bin/libgcc_s_dw2-1.dll /c/maxima/bin
cp /mingw32/bin/libgcc_s_dw2-1.dll /c/maxima/wxMaxima
cp /mingw32/bin/libreadline6.dll /c/maxima/bin
cp /mingw32/bin/libreadline6.dll /c/maxima/wxMaxima
cp /mingw32/bin/libtermcap-0.dll /c/maxima/bin
cp /mingw32/bin/libtermcap-0.dll /c/maxima/wxMaxima
cp /mingw32/bin/libwinpthread-1.dll /c/maxima/bin
cp /mingw32/bin/libwinpthread-1.dll /c/maxima/wxMaxima
cp ~/tclwinkill.dll /c/maxima/bin
cp ~/winkill.exe /c/maxima/bin
cp /mingw32/bin/zlib1.dll /c/maxima/bin
cp /mingw32/bin/zlib1.dll /c/maxima/wxMaxima
cp /mingw32/bin/libexpat-1.dll /c/maxima/wxMaxima
cp /mingw32/bin/libgmp-10.dll /c/maxima/wxMaxima
cp /mingw32/bin/libjpeg-8.dll /c/maxima/wxMaxima
cp /mingw32/bin/libpng16-16.dll /c/maxima/wxMaxima
cp /mingw32/bin/libstdc++-6.dll /c/maxima/wxMaxima
#now copy exe and dll from :
cp /mingw32/lib/gcc/i686-w64-mingw32/4.9.2/cc1.exe /c/maxima/bin
cp /mingw32/lib/gcc/i686-w64-mingw32/4.9.2/liblto_plugin-0.dll /c/maxima/bin
cp /mingw32/i686-w64-mingw32/bin/as /c/maxima/bin/
cp /usr/bin/msys-intl-8.dll /c/maxima/bin/
cp /usr/bin/msys-iconv-2.dll /c/maxima/bin/
cp /usr/bin/msys-2.0.dll /c/maxima/bin/
cp /usr/bin/msys-gcc_s-1.dll /c/maxima/bin/
cp /c/maxima/bin/*.* /c/maxima/wxMaxima
13) Once "make iss" is complete, run Inno Setup on the maxima.iss
KS: comment out line 96:
;Source: "c:/maxima\bin\xmaxima"; DestDir: "{app}\bin\"; Flags: ignoreversion; Components: "xmaxima"
file. It is recommended to remove the temporary maxima install
directory (c:/maxima above) before testing the installation.
output is here:
C:\MinGW\msys\1.0\home\k\maxima\maxima-5.34.1\Output
14) Test the installed package. For example
o Run the maxima testsuite: run_testsuite()
o Try compiling a function. This has been a problem in the past
- f(x):=x+2;
- compile(f);
- f(2);
if you get errors here then:
There are some brief notes on gcc issues in INSTALL.win32
http://sourceforge.net/p/maxima/code/ci/master/tree/INSTALL.win32
The Windows installer for gcl-based maxima requires gcc and as. The
gcc
files required depend on the version of gcc used. If compilation fails
then some troubleshooting is required.
One way to do this is to save the .c file generated by gcl:
f(x):=x+2$
:lisp (setq compiler::keep-gaz t)
compile(f);
then open a cmd window and run gcc from the command line.
Most of my problems have been missing dlls, as each gcc version requires
a different set of dlls
Run the gcc installed with maxima as "c:\path\to\gcc -v
c:\path\to\gazonk.c" and see if you get any errors or popup messages.
Usually I have to add a dll to the install directory; sometimes a new
executable is required.
See if this helps.
o Test the graphics systems in both xmaxima and wxmaxima
plot2d(sin(x),[x,0,10]);
plot3d(x*y,[x,-1,1],[y,-1,1]);
load(draw)$
draw3d(xu_grid = 30, yv_grid = 60, surface_hide = true,
parametric_surface(cos(phi) * sin(theta),
sin(phi) * sin(theta),
cos(theta),
theta, 0, %pi, phi, 0, 2 * %pi))$
o Check that plotting to Postscript works
plot2d(sin(x),[x,0,10],[psfile,"pstest.ps"]);
o Try out the on-line help: describe(sin)
Troubleshooting
The Windows installer for gcl-based maxima requires gcc and as. The gcc
files required depend on the version of gcc used. If compilation fails
then some troubleshooting is required.
One way to do this is to save the .c file generated by gcl:
f(x):=x+2$
:lisp (setq compiler::keep-gaz t)
compile(f);
then open a cmd window and run gcc from the command line.