0

大约一个月前,我开始深入研究 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

我已经尝试清理和重建解决方案。

4

2 回答 2

1

This error occurs when debug version of a library is linked to the project, but corresponding debug database file (.pdb) is not accessible. You need to re-build Effects11d.lib from sources to generate .pdb on your new computer. Sources of the library are reported to be available: http://www.d3dcoder.net/phpBB/viewtopic.php?f=4&t=241

于 2012-10-15T13:10:25.133 回答
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”复制到与可执行文件相同的目录即可。而且不需要重新编译。

图片

于 2015-11-17T17:21:45.187 回答