문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top