问题1.如何将 winmm.lib 库文件连接。我用的是VS2010
方法一:#pragma comment(lib, "winmm.lib ") 预处理命令
方法二:Project -->Properties(ALT+F7 )-->Configuration Properties-->Linker-->
Input-->Additional Dependencies-->winmm.lib(注意Edit时将默认的lib·先复制,一起粘到窗口中)
winmm.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
原书说明 :“
HELLOWIN将存取文件HELLOWIN.WAV,该文件在本书所附光盘的HELLOWIN目录中。运行HELLOWIN.EXE时,内定的目录必须是HELLOWIN。
在Visual C++中运行此程序时,虽然运行文件会产生在HELLOWIN的RELEASE或DEBUG子目录中,但运行程序的目录还是必须在HELLOWIN中。 "