| |
Raistlin
Registered: Mar 2007 Posts: 680 |
Spindle/PEF on Windows
Caveats: I'm an old-school C64 programmer that has spent the last 25+ years developing for PC and console, mostly using Visual Studio and simple installers for SDKs etc. No Linux background at all...
So.. I've been developing using Spindle for a month or so now - and loving it. I've been piecing my demo together using Spin.exe, the prebuilt easy-to-use tool LFT made for quickly piecing demos together with Spindle.
I'd now quite like to take a look at PEF - which is better suited for larger productions. I've been doing ok with Spin.exe, manually working out where to place everything, how best to preload etc .. but now might be a good time to look at PEF as my demo starts to get more complicated with overlapping parts.
Downloading MinGW, GnuWin32 and XA, I still kept hitting problems... make.exe complains:-
"cc -Wall -O3 mkheader.c -o mkheader
process_begin: CreateProcess(NULL, cc -Wall -O3 mkheader.c -o mkheader, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [mkheader] Error 2"
And firing off GCC manually complains, too.. first of all about <err.h> (changing it to "compat/err.h" helps)... then it complains about data_prgloader - which I assume should be in prgloader.h, which is generated by other compile processes, but which appears to be empty (0 bytes) for me...
"gcc -Wall -O3 -o pef2prg.0 pef2prg.c
"pef2prg.c: In function 'save_prg':
pef2prg.c:88:9: error: 'data_prgloader' undeclared (first use in this function)
fwrite(data_prgloader, sizeof(data_prgloader), 1, f);"
Has anyone successfully built this on Windows..? Any idea how to get the makefile to work correctly..? |
|
| |
Sander
Registered: Jan 2002 Posts: 496 |
*humble bow* |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
the first is because you are mixing mingw and gnuwin32 - DONT DO THAT, it causes various funky problems. install msys (which includes mingw) and use that instead - see https://stackoverflow.com/questions/1240422/compiling-small-gcc.. |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
Thanks Groepaz! Happy to say I got that compiling now :-)
It doesn't work yet - but it compiles ;-) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
What keeps you from running a minimal Linux VM or Docker for Windows? I don't quite see why people torture themselves trying to build non-Windows command-line apps to run in a native Windows environment. |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
Hmm... I've no idea why - because it's not something I've done regularly I guess.
In my day job I'm a "programmer" (when I get the time) on PC/Xbox/PS4/... even on PS4, which is Linux-like/lite in it's tool set, I just hit an "install" button, hit "Build" in Visual Studio and it "Just Works".
I've gotten it working now, actually... the biggest thing that I needed to do, other than installing the tools that Groepaz mentioned, was to put a single line at the top of the makefile... "CC=GCC". |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
FYI, the final problems that I was seeing with it crashing were because I was passing some commandline arguments to "make"...
When I used "make -E cc=gcc" (or similar, I can't quite remember), the makefile was picking up the commandline args and passing those into gcc itself as well... which was then causing some oddness to appear in some of the files. Although everything compiled, some C64-binary files were coming out at zero length .. making Spin.exe later crash. Reducing it all down so that I could compile with only "make" - by adding "CC=GCC" to the makefile - fixed it. |