用PlaySound(“gpwswav\-SNKRATE.wav”, NULL, SND_ASYNC| SND_NOSTOP);播放,加了#include “mmsystem.h”和#pragma comment(lib,”Winmm.lib”),但是编译时说”PlaySound” : undeclared identifier、”SND_ASYNC” : undeclared identifier、”SND_NOSTOP” : undeclared identifier。为什么总是未定义?
解决方案
10
10
File: "c:\Microsoft SDK\Include\prerelease\MMSystem.h" 1 occurrences found on 1 lines 456: #define SND_ASYNC 0x0001 /* play asynchronously */ File: "c:\Microsoft SDK\Include\MMSystem.h" 1 occurrences found on 1 lines 456: #define SND_ASYNC 0x0001 /* play asynchronously */ File: "C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\MMSystem.h" 1 occurrences found on 1 lines 456: #define SND_ASYNC 0x0001 /* play asynchronously */ File: "C:\Program Files\Microsoft Visual Studio\VC98\Include\MMSYSTEM.H" 1 occurrences found on 1 lines 469: #define SND_ASYNC 0x0001 /* play asynchronously */
10
这么麻烦 直接建个MFC程序 或windows程序 得了
10
第8行后面被注释掉的是循环播放,lz可以试试