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.
Asked
Active
Viewed 2,787 times
2 Answers
2
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.

Alan
- 45,915
- 17
- 113
- 134
-
Where do I change this in my project? Sorry if it's kind of a 'duh' question. – Aaron Apr 21 '13 at 03:06
-
If the file is added to your project, right click it and select properties, and change file type to something more appropriate. – Alan Apr 21 '13 at 03:41
2
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.

John
- 619
- 2
- 9
- 24