我的问题是,我正在尝试创建一个C++项目的动态链接库,它使用直接声音源和头文件。我需要包含一个名为dsound.lib的文件。当我编译我的代码时,我得到以下错误
正在编译源文件...RtAudio.cpp RtAudio.cpp:3477:20: dsound.h:没有这样的文件或目录RtAudio.cpp:成员函数virtual unsigned int RtApiDs::getDeviceCount()': RtAudio.cpp:3580: error:LPDSENUMCALLBACK未在此作用域中声明RtAudio.cpp:3580: error:DirectSoundEnumerate' was not declared in this scope RtAudio.cpp:3589: error: expected)‘在"deviceQueryCallback“RtAudio.cpp:3589: error:DirectSoundCaptureEnumerate' was not declared in this scope RtAudio.cpp:3580: warning: unused variable 'DirectSoundEnumerate' RtAudio.cpp:3589: warning: unused variable 'DirectSoundCaptureEnumerate' RtAudio.cpp: In member function虚拟RtAudio::DeviceInfo RtApiDs::getDeviceInfo(unsigned int)':RtAudio.cpp:3626: error:` `LPDIRECTSOUND’未在此作用域中声明
有153个这样的错误。错误消息的第一行指出找不到dsound.h,但我的项目中有那个头文件。我不明白问题出在哪里。
有人能对此提出一些解决方案吗?
谢谢
发布于 2010-02-19 00:51:33
某些版本的MinGW缺少针对DirectShow构建所需的标头。尝试使用包含gcc 4.4或更高版本的MinGW。
Qt开发团队的一篇博文中描述了这个问题,MinGW是该团队支持的编译器。按照this posting中的描述,他们在使用MinGW构建其多媒体模块(电话)的Windows实现时遇到了问题。
https://stackoverflow.com/questions/2290373
复制相似问题