fr_public icon indicating copy to clipboard operation
fr_public copied to clipboard

Tips for building with vs2019

Open xwize opened this issue 5 years ago • 3 comments

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.

xwize avatar Aug 10 '20 12:08 xwize

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.)

kungfooman avatar Aug 10 '20 14:08 kungfooman

can i have help?

EGAMatsu avatar Apr 25 '21 19:04 EGAMatsu

can i have help?

You might wanna check this, I explained some steps required for newer VS versions: https://github.com/farbrausch/fr_public/issues/95

kungfooman avatar Apr 26 '21 07:04 kungfooman