-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile for Windows - support.cpp - lots of errors #249
Comments
While the windows are currently broken anyway because of my attempt to add new feature with include paths, that shouldn't cause this missing I have already seen it in the CI, but I can't figure out what changed, I don't remember touching support.cpp or includes in a way to make this happen and doing a quick look through history of commits since last release I haven't found anything suspicious either. It's almost as if something changed in the toolchain, or I'm blind. Or the standard set to If you will be able to hunt this down and find root cause, I'll be very thankful, as I don't have any windows system to test this except the CI servers, which seems to sometimes build it, last commit:
ah.. now I see, the VS build will compile, the mingw fails same way as you describe. Can you try to enable GNU extensions? (make: Looking at build logs now, I'm 99% it's this commit: So it's either those GNU extensions being switched off, or move from C++14 to C++17. If you have windows at hand and time to toy with this, try to find which one it is, thank you. WRT to the main fail on windows - I'm planning to rewrite all file handling with std::filesystem to make windows build work correctly again, you can try to work on your That one should work on windows... then later we can merge after I finish the std::fs thing, but lately I have difficult time to put any hours into sjasmplus, so be prepared for this to take some undefined time (I hope to release next version this year, but it could fizzle out). Anyway, you can get more familiar with the project as is right now, keep asking if you have questions (I'm also on Next discord and one of the "ZX Spectrum" discords as "Ped7g" if you want to discuss something online. Thank you for understanding and patience. :) |
Thanks ped7g, really appreaciate your input. I will have little time until Thrusday to test it, but then will work through your suggestions. |
Okay, I took some time today and can confirm that CXXFLAGS=-std=gnu++17 $(CFLAGS) works. I messed up something else, so deleted everything and downloaded from GIT again and it now works, with the provided Makefile.win, but with the change above. The total installation is now pretty simple. Download and install MSYS2 as described in here: Then start MSYS2 and inside download the following three packages:
Then start the MSYS2 environment for mingw (there is a start menu entry). Then download the software: And then just edit the Makefile.win file and then compile it: It compiles correctly and you have a compiled windows version.
So I can confirm it was just the gnu++17 entry that needs change. |
Here is the edited makefile... |
Thank you for confirming it's the gnu extension which makes it work under mingw. I expect support.cpp to be cut down a bit after the migration to std::filesystem, so I will revisit this later, in ideal case I would like to stick to c++17 only, but if it's enough to change it only makefile.win, then I really don't care too much, windows details are for me personally out of scope, z00m and others have to deal with that OS. |
To be honest, Windows is also out of my scope. My last windows notebook died several months ago and I have no intention of getting a new one. What else I'm willing to do is install Windows 10 in a virtual machine, because my current Linux laptop came with an windows OEM license. Then I can still do those Windows 10 builds, but I refuse to mess with binaries for Windows 7 and older. |
Recommended windows toolchain was updated to something current, and I also temporarily modified Makefile.win according to the proposal (CXXFLAGS=-std=gnu++17 instead of c++17). |
I am trying to compile sjasmplus for windows. For now it is just compiling as it, but I am planning to do some changes for RST mnemonics to embedd correct data word after the RST opcode and parse RST #8, #1234.
However for now I need to be able to compile the original code for Windows. I can compile under Linux (even linux for Windows subsystem) but on both Linux and Windows environements compilation fails on support.cpp.
Certain types are not available (HANDLE, STD_OUTPUT_HANDLE and others, that typically come from windows.h but are not included anywere).
This is the output from trying to compile on Windows with MSYS2/mingw64 environment.
I tried to include windows.h in here:
But then I get other errors, which I even less understand:
So I think something is missing in my compilation environment, but I cannot figure out what it is.
The text was updated successfully, but these errors were encountered: