DirectX的版本通过VS2010打造的作品,而不是exe文件 [英] DirectX Release build works through VS2010, but not exe

查看:265
本文介绍了DirectX的版本通过VS2010打造的作品,而不是exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过谷歌下探通过堆栈溢出了几年了,但并没有要求/回答什么作为呢,所以这里去。

I've been dropping by Stack Overflow for a few years now via Google, but haven't asked/answered anything as of yet, so here goes.

基本上我有运行Debug或释放时,设置绘图模式和地形的DirectX 11的一切3D渲染架构工作正常,没有任何问题,建立通过Visual Studio 2010。

Basically I have a 3D rendering framework set up drawing models and terrain in DirectX 11. Everything works fine, with no problems when running either Debug or Release builds through Visual Studio 2010.

不过,当我浏览到我的文件夹,并运行可执行文件independantly,只有调试版本的作品。发布版本什么鲜明的色彩我已经设置显示器,但没有几何,虽然帧率看起来好像它的运行,和我的鼠标锁定在窗口(togglable用鼠标中键)的中心,尽管该程序运行良好

However, when I navigate into my folders and run the executables independantly, only the Debug build works. The Release build displays whatever clear colour I have set, but no geometry, although the framerate looks as though it's running, and my mouse is locked to the center of the window (togglable with middle mouse button), as though the program is running fine.

我首先想到的是,我的内容是无法加载,因为那有这个效果在旧的项目,但这个项目的崩溃,如果出现这种情况,并贯穿PIX的exe文件已经确认的全部资产都正确。

My first thought was that my content was failing to load, as that had this effect in an old project, but this project crashes if that happens, and running the exe through PIX has confirmed that all assets are loaded correctly.

这个问题被证明难以谷歌,因此,如果任何人有任何想法可能是什么造成这一点,它会是多少AP preciated。我会发布一些code。如果它帮助,但我不认为这将是相关的。

The problem is proving difficult to google, so if anyone has any idea what could cause this, it'd be much appreciated. I'd post some code if it helped, but I don't see what would be relevant.

推荐答案

最后期限迫近,更重要的事情平息了,所以我做了构建配置一些摆弄。

Deadlines loomed and more important matters subsided, so I did some fiddling with build configurations.

原来,在默认的调试配置,C / C ++,code生成,运行时库设置为多线程调试DLL(/ MDD)。在发布此设置为多线程DLL(/ MD)。切换此设置以匹配其运行通过Visual Studio构建发布配置的结果,但它的外面显示黑屏。

Turns out that in the default debug configuration, C/C++, Code Generation, Runtime Library is set to 'Multi-threaded Debug DLL (/MDd)'. In release this is set to 'Multi-threaded DLL (/MD)'. Switching this setting to match the release configuration results in a build which runs through visual studio, but displays a black screen outside of it.

我仍然不知道是这个原因,所以任何其他的答案将是AP preciated。

I still have no idea of the cause of this, so any other answers would be appreciated.

这篇关于DirectX的版本通过VS2010打造的作品,而不是exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆