I can’t really help with Windows details, but, cheapglk is a library, not a complete executable.
(Either way, you’d want to compile *.c, not just main.c.)
So, what you want to do is compile cheapglk as a static library or a DLL.
Since you’re running gcc, it seems like you have an environment where you could also run make. If so, the makefile that ships with cheapglk ought to handle this. If not, these instructions might help.
After you’ve done that, you can compile an interpreter, linking it with the cheapglk library that you’ve already built.
So I have a bunch of .o files now. This looks like the long way to do it, but I didn’t see any other way.
nmake -f Makefile (which didn’t work before)
now produces libcheapglk.a It didn’t work before, when I tried nmake -f Makefile off the bat. It also produces Makefile.cheapglk.
Then I pulled the glulxe repo into a sister director and figured I should run these commands by hand in order to create glulxe.exe, which I assume can read in STDIO to the game command prompt and output story text.
And I have a bunch of object files but I don’t know what to do. I feel like I’m missing something here, and I can’t interpret what’s in the makefile. I think switching the / to \ made a bit of progress, but that’s it.
I don’t have a cheapglk.a/o file, only libcheapglk.a/o, but even changing the -l argument, or -l to capital L or i or I (a long shot, but these are the main ones I know,) I’ve got nothing to work.
Still, a lot of other code I remember from other contexts is making a lot of sense…which gives me faith I’ll eventually see what I’m doing wrong and have a eureka moment. Thanks again for the help so far.