Where can I find 'winmm.lib' (I'm using Visual Studio 2012)

烂漫一生 提交于 2019-12-04 10:35:57

winmm.lib isn't part of the DirectX SDK but is part of the Windows SDK.

Latest Windows SDK versions were also heavily reorganized but it includes the library you're looking for.

Rokman

Just put the line below in stdafx.h

#pragma comment(lib, "winmm.lib")

If you are trying to build any of the legacy DirectX SDK samples with VS 2012 or VS 2013, you need to modify the include/libs paths per the instructions on bottom of the page on MSDN. The most important change is that you must reverse the Include/Lib path order:

For VS 2010 it was:

$(DXSDK_DIR)Include;$(IncludePath)

$(DXSDK_DIR)Lib\x86;$(LibraryPath) or $(DXSDK_DIR)Lib\x64;$(LibraryPath)

For VS 2012/2013 it has to be:

$(IncludePath);$(DXSDK_DIR)Include

$(LibraryPath);$(DXSDK_DIR)Lib\x86 or $(LibraryPath);$(DXSDK_DIR)Lib\x64

Of course a better option is not spend time learning the older Direct3D 10 API at all, and use the latest Direct3D 11 Win32 desktop tutorials on MSDN Code Gallery. In fact, I've posted many of the legacy DirectX SDK samples there so they work fine with VS 2012/2013 Express for Windows Desktop and VS 2012/2013 Pro+ as-is without the DirectX SDK at all.

Read these blog posts:

DirectX SDK Samples Catalog

DirectX SDK Tools Catalog

Living without D3DX

DirectX SDKs of a certain age

And review these CodePlex projects:

DirectX Tool Kit

DirectXMesh

DirectXTex

DXUT for Direct3D 11

Effects 11

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