Application works in visual studio but release/debug exe does not

五迷三道 提交于 2019-12-13 06:24:23

问题


I am making a game using dx11. When I compile and run the code in visual studio it works fine however if I try and run the code from the .exe file in either the debug or release folders I got the following error:

"Could not initialize direct sound"

I have not moved the folders/directories at all.

Is this something to do with direct sound not being compatible with dx11? If so why would it still run inside visual studio.

I am using MS Visual Studio 10. My direct sound class has the following:

#pragma comment(lib, "dsound.lib")
#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "winmm.lib")
#include <windows.h>
#include <mmsystem.h>
#include <dsound.h>
#include <stdio.h>

Advance Thanks

来源:https://stackoverflow.com/questions/15543918/application-works-in-visual-studio-but-release-debug-exe-does-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!