Skip to content

compiling with msvc > 1900 #1

@OpheliaComplex

Description

@OpheliaComplex

I had to make some tweaks to compile this with newer msvc - maybe helpful to anyone looking to build from source

  1. adding legacy_stdio_definitions.lib in cmakelists, fixed unresolved externals for printf etc

target_link_libraries(
${PROJECT_NAME}
PRIVATE
${HavokLibs}
${NifLibLibPath}/niflib_static.lib
"legacy_stdio_definitions.lib"
)

  1. in main.cpp or similar, solves unresolved external __iob__ whatever

// Fix iob change in newer msvc
FILE _iob[] = {*stdin, *stdout, *stderr};

extern "C" FILE * __cdecl __iob_func(void)
{
return _iob;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions