Skip to content
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

Tips for building with vs2019 #98

Open
xwize opened this issue Aug 10, 2020 · 3 comments
Open

Tips for building with vs2019 #98

xwize opened this issue Aug 10, 2020 · 3 comments

Comments

@xwize
Copy link

xwize commented Aug 10, 2020

I've managed to get w3 compiling with vs2019 but there were a couple of adjustments that needed to be made.

First there was the matter of string concatenation. In a few places through the source there are instances where #define STR "s" are concatenated with literals "x"STR"y"... I think this clashes with some of the more recent developments with how C++ extends literal suffixes. It's easily fixed by just inserting some spaces.

The next issue I ran into was the linker complaining about sprintf. Apparently after vs2015 this was all gutted out and put into legacy_stdio_definitions.lib. It's fixed by just adding this to the linker input for the projects that complain. This doesn't fix the complaint about __iob_func. For that I had to add FILE _iob[] = { *stdin, *stdout, *stderr }; extern "C" FILE * __cdecl __iob_func(void) { return _iob; } to loadpng.cpp.

I'm happy to report the tool runs fine, Afterburner reports a whopping 2300fps in the main window. They don't write code like they used to! Hope this saves someone 20 minutes.

@kungfooman
Copy link

Just a bit sad that there is no maintained community fork, would be interesting to collaborate on it.

Getting something to build should be a non-issue, no matter which compiler (or even emscripten etc.)

@EGAMatsu
Copy link

can i have help?

@kungfooman
Copy link

can i have help?

You might wanna check this, I explained some steps required for newer VS versions: #95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants