3

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.

4

2 回答 2

2

我在尝试加载 .obj 文件时遇到了同样的问题。方法是右键单击Visual Studio 中的文件并转到properties。在General部分中,选择exclude from build以防止 VS 尝试链接它。

于 2013-10-23T21:00:01.313 回答
2

这是一个常见的文件扩展名,意味着两个不同的东西。

C++ 链接器认为您的.obj文件是通用对象文件格式,而您的 .obj 文件实际上是 3d 对象定义文件。

C++ 编译器输出*.obj文件,这些文件与您的搅拌机.obj文件不同。

您需要将项目设置为将该 *.obj 文件视为资源,而不是链接它。

于 2013-04-21T02:36:51.953 回答