tags:

views:

240

answers:

1

Hello, My problem is that I am trying to create a DLL of a C++ project which uses Direct Sound source and header files. There is a file called dsound.lib which i need to include. When I compile my code I get following errors

Compiling source file(s)... RtAudio.cpp RtAudio.cpp:3477:20: dsound.h: No such file or directory RtAudio.cpp: In member function virtual unsigned int RtApiDs::getDeviceCount()': RtAudio.cpp:3580: error:LPDSENUMCALLBACK' was not declared in this scope RtAudio.cpp:3580: error: DirectSoundEnumerate' was not declared in this scope RtAudio.cpp:3589: error: expected)' before "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 functionvirtual RtAudio::DeviceInfo RtApiDs::getDeviceInfo(unsigned int)': RtAudio.cpp:3626: error: `LPDIRECTSOUND' was not declared in this scope

And there are 153 such errors. The first line of the error message says that dsound.h not found, but I have that header file in my project. I do not understand what the problem is.

Can some one please suggest any solution to this.

Thanks

A: 

Some versions of MinGW lack the necessary headers to build against DirectShow. Try using a MinGW which includes gcc 4.4 or above.

This problem is described in a blog posting from the Qt development team, for which MinGW is a supported compiler. They had problems building the Windows implementation of their multimedia module (Phonon) using MinGW, as described in this posting.

Gareth Stockwell