Question

I have a Win32 console project in VS2010 and I added an .obj file to the solution that I exported from Blender (it's a simple cube), but I get a LNK1107 error saying it can't read at 0x107 when I run or build the project. I tried going to Project > Properties > C/C++ > Additional Directories and named the .obj file there and put my file under the same directory as my source code and that didn't fix it.

Was it helpful?

Solution

This is a case of common file extensions meaning two different things.

The C++ Linker thinks your .obj file is a Common Object File Format, where as your .obj file is actually a 3d object definition file.

C++ compilers output *.obj files, which are different than your blender .obj file.

You need to set the project to treat that *.obj file as a resource, not to link it.

OTHER TIPS

I just had the same problem trying to load a .obj file. The way to do it is to right click on the file in Visual Studio and go to properties. In the General section, select exclude from build which prevents VS from attempting to link it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top