大约一个月前,我开始深入研究Frank Luna的“使用Directx11进行3D编程简介”。到目前为止我没有遇到任何问题,并通过了本书的一大部分。最近,我不得不切换计算机并开始设置书中的第一个演示,以确保所有内容都已正确配置。我大约一个月前在我的旧电脑上设置了这个演示,没有任何问题,现在我甚至无法在新电脑上运行这个基本演示。我不确定这些警告是否与坠机有关。
警告如下:
1> Creating library C:\Users\Rizzmond\Desktop\test\Debug\test.lib and object C:\Users\Rizzmond\Desktop\test\Debug\test.exp
1>Effects11d.lib(d3dx11dbg.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(d3dxGlobal.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectAPI.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectLoad.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectNonRuntime.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectReflection.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectRuntime.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>LinkEmbedManifest:
1> Creating library C:\Users\Rizzmond\Desktop\test\Debug\test.lib and object C:\Users\Rizzmond\Desktop\test\Debug\test.exp
1>Effects11d.lib(d3dx11dbg.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(d3dxGlobal.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectAPI.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectLoad.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectNonRuntime.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectReflection.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Effects11d.lib(EffectRuntime.obj) : warning LNK4204: 'C:\Users\Rizzmond\Desktop\test\Debug\vc100.pdb' is missing debugging information for referencing module; linking object as if no debug info
1> test.vcxproj -> C:\Users\Rizzmond\Desktop\test\Debug\test.exe
崩溃来自D3D11CompileFromFile,在尝试加载文件时返回D3D11_ERROR_FILE_NOT_FOUND。我完全像以前一样设置了这个演示,所以我无法理解为什么它无法加载这个“color.fx”文件。您可以在此处查看相关代码和解决方案资源管理器:http://i.imgur.com/vVUe5.jpg
我尝试过清理和重建解决方案。
答案 0 :(得分:1)
当库的调试版本链接到项目时会发生此错误,但无法访问相应的调试数据库文件(.pdb)。您需要从源代码重新构建Effects11d.lib以在新计算机上生成.pdb。据报道,图书馆的来源可用:http://www.d3dcoder.net/phpBB/viewtopic.php?f=4&t=241
答案 1 :(得分:0)
我遇到了类似的问题
---------------------------
Unexpected error encountered
---------------------------
File: d:\3dgameprogramming\code\chapter 6 drawing in direct3d\box\boxdemo.cpp
Line: 310
Error Code: D3D11_ERROR_FILE_NOT_FOUND (0x887c0002)
Calling: D3DX11CompileFromFile
Do you want to debug the application?
---------------------------
问题是:D3DX11CompileFromFile()无法找到“fx \ color.fx”, 只需将“.... \ Code \ Chapter 6 Drawing in Direct3D \ Box \ FX”复制到与可执行文件相同的目录中。 而且无需重新编译。