Skip to content

Tips for building with vs2019 #98

@xwize

Description

@xwize

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions