retroforth/doc/book/Building-Windows
crc aa4d07a1f8 remove old files, fix some things in Windows build instructions
FossilOrigin-Name: 0a128ebbf78dff75d14fc4bd254bc90eadd670637ca52f3b377c93fceee4f2f2
2019-04-24 15:00:55 +00:00

55 lines
1.3 KiB
Text

# Building RETRO on Windows
It is possible to build RETRO on Windows, though a few of the
extensions are not supported:
- no `unix:` words
- no `gopher:` words
## Process
This is currently more difficult than on a Unix host. If you have
Windows 10 and WSL, it may be better to build under that (using
the Linux instructions).
### Setup TCC
Go to http://download.savannah.gnu.org/releases/tinycc/
Download the *winapi-full* and *tcc-xxxx-bin* packages for your
system. Decompress them, copy the headers from the winapi
package into the tcc directory.
### Prepare Source
You'll need to comment out (or remove) some things before RETRO
will build.
In *rre.c*:
- remove includes for unistd.h, sys/sockets.h, netinet/in.h
netdb.h, errno.h, sys/wait.h, signal.h
- remove the #define USE_TERMIOS line
- change the #define NUM_DEVICES to 6
- remove io_unix_handler and io_gopher_handler from IO_deviceHandlers
- remove io_unix_query and io_gopher_query from IO_queryHandlers
In *image-functions.c*:
- remove includes for unistd.h
In *image-functions.h*:
- remove includes for unistd.h
In *io\filesystem.c*:
- remove includes for unistd.h
In *io\floatingpoint.c*:
- remove includes for unistd.h
### Build
\path\to\tcc rre.c image-functions.c io\filesystem.c io\floatingpoint.c -o retro.exe