當前位置:首頁 > 資訊 > info6 > 正文

使用DirectSound時引用dsound.h報錯

發表于: 2015-02-09   作者:chduguxue   來源:轉載   瀏覽:
摘要: #include"dsound.h"時編譯指向dsound.h內報錯d:\代碼測試_git\directsound\directsound\dsound.h(230):errorC4430:缺少類型說明符-假定為int。注意:C++不支持默認int1>d:\代碼測試_git\directsound\directsound\dsound.h(230):errorC2143:語法錯誤:缺少“;”(在“

#include "dsound.h"時編譯指向dsound.h內報錯

d:\代碼測試_git\directsound\directsound\dsound.h(230): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(230): error C2143: 語法錯誤 : 缺少“;”(在“*”的前面)
1>d:\代碼測試_git\directsound\directsound\dsound.h(230): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(349): error C2146: 語法錯誤: 缺少“;”(在標識符“lpwfxFormat”的前面)
1>d:\代碼測試_git\directsound\directsound\dsound.h(349): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(349): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(365): error C2146: 語法錯誤: 缺少“;”(在標識符“lpwfxFormat”的前面)
1>d:\代碼測試_git\directsound\directsound\dsound.h(365): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(365): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(416): error C2146: 語法錯誤: 缺少“;”(在標識符“lpwfxFormat”的前面)
1>d:\代碼測試_git\directsound\directsound\dsound.h(416): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(416): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(425): error C2146: 語法錯誤: 缺少“;”(在標識符“lpwfxFormat”的前面)
1>d:\代碼測試_git\directsound\directsound\dsound.h(425): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(425): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\代碼測試_git\directsound\directsound\dsound.h(686): error C2061: 語法錯誤: 標識符“LPWAVEFORMATEX”
1>d:\代碼測試_git\directsound\directsound\dsound.h(696): error C2061: 語法錯誤: 標識符“LPCWAVEFORMATEX”
1>d:\代碼測試_git\directsound\directsound\dsound.h(770): error C2061: 語法錯誤: 標識符“LPWAVEFORMATEX”
1>d:\代碼測試_git\directsound\directsound\dsound.h(780): error C2061: 語法錯誤: 標識符“LPCWAVEFORMATEX”
1>d:\代碼測試_git\directsound\directsound\dsound.h(1041): error C2061: 語法錯誤: 標識符“LPWAVEFORMATEX”
1>d:\代碼測試_git\directsound\directsound\dsound.h(1099): error C2061: 語法錯誤: 標識符“LPWAVEFORMATEX”

先引用mmsystem.h即可,如下:

#include <mmsystem.h>

#include "dsound.h"

使用DirectSound時引用dsound.h報錯

版權所有 IT知識庫 CopyRight ? 2009-2015 IT知識庫 IT610.com , All Rights Reserved. 京ICP備09083238號
广东25选5开奖结果