embed
embed copied to clipboard
LNK1107 with MSVC when embedding 3d models with obj extension
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
- Embed any obj file
- Compile with MSVC
- 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.