Skip to content

LNK1107 with MSVC when embedding 3d models with obj extension #11

@itsdanott

Description

@itsdanott

Description

When embedding files with the obj extension (3d models) and compiling with MSVC the build will fail with

fatal error LNK1107: invalid or corrupt file: cannot read at 0x6C8C

I assume this is due to the obj suffix being interpreted as C/C++ obj.

The generated file path looks like this

embed\autogen\embedded\src\embedded_file_name_obj.cpp.obj

How to reproduce

  1. Embed any obj file
  2. Compile with MSVC
  3. Notice build failing with LNK1107

Workaround & Other Compilers

Workaround for now is to change the extension to something else - but of course this can get annoying when re-exporting out of 3d software.

Compilation with MinGW / GCC works without any issues.

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