compiler errors – Can I use WASAPI in C code on MinGW64? If so, how?
I am using MinGW64 which has the necessary headers to use WASAPI. However, following the WASAPI programming guide I added following code:
const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator);
const IID IID_IAudioClient = __uuidof(IAudioClient);
const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient);
however, when I compile the code I get following error
error: implicit declaration of function '__uuidof' [-Wimplicit-function-declaration]
I checked, I am linking against Ole32.lib, so I thought that should be all, but apparently not so.
So my suspicion is that it has something to do with the C/C++ mismatch. But is that true? Can WASAPI only be used with C++?
Read more here: Source link
