How to make the z80 libraries under windows

Installing on windows
Post Reply
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

How to make the z80 libraries under windows

Post by alvin »

Molochite originally asked on the z88dk-users mailing list:

> I have a problem, i use windows. I can build the binaries without problems
> with vs2005, but the libraries... I have tried with "GNU Make for windows"
> and with cygwin, but the two fails at least for me).
> how can i build the libraries from windows?

I'm also using windows as the primary platform so I can help you here.

I use GNU utilities for Win32: The direct download links on that page are dead but you can still download from the sourceforge link. Unzip someplace (c:\gnu ?) and add the two new binary directories to your path {gnu}\usr\local\wbin and {gnu}\bin

These win32 gnu utilities do not quite behave properly. For example the rm command, given a list of matching files to remove as in "rm *.tmp *.opt" returns with error if any matching string does not match and will not remove any matching files unless all matching strings match. For this reason, "make clean" does not work for me under windows. You also have to specify -i as in "make -i" whenever invoking make so that make will not quit prematurely when rm returns with these errors. Lastly, always run make from within the provided sh, otherwise the dos versions of some commands like "mkdir" get executed rather than the GNU version and this again causes trouble.

So after installing the GNU utils above you can compile the cpc library with the following:

1. open up command console
2. do whatever you need to do to initialize your path variable to point at {z88dk}\bin and the two GNU bins
3. cd {z88dk}\libsrc
4. sh
5. rm *.lib (in case any previously compiled libs are there now)
6. make -i cpc_clib.lib (a list of make rules for other targets is found, as always, in Makefile; or just do "make -i" to make everything)
7. make -i cpcansi_clib.lib
8. make install (copies the lib files to the right place)
9. exit (to get out of sh)
Posts: 42
Joined: Thu Jul 19, 2007 10:54 am

Post by Mochilote »

This works perfectly, many thanks.
Molochite originally asked on the z88dk-users mailing list:
Uhmmm, Molochite sounds like Mochilote, no? :lol: , many thanks avlin ;)
Post Reply