Question

I'm getting linker errors when trying to use Kinect Audio Data using C++.

I looked at the programmers guide here.

But it does not provide any details as to which header files to include or which libraries to compile the code with.

I included the following headers -

#include <Dmo.h>
#include <Wmcodecdsp.h>
#include <uuids.h>
#include <propsys.h>

Now I get a linker error saying -

error LNK2001: unresolved external symbol _FORMAT_WaveFormatEx
error LNK2001: unresolved external symbol _MEDIASUBTYPE_PCM
error LNK2001: unresolved external symbol _MEDIATYPE_Audio
error LNK2019: unresolved external symbol _MoInitMediaType@8 referenced in function _main
error LNK2001: unresolved external symbol _IID_IMediaObject

What should I link my project with?

Was it helpful?

Solution

To resolve linker issues you throw .libs in:

  • strmiids.lib - generic DirectShow symbols
  • dmoguids.lib, msdmo.lib - DMO related
  • wmcodecdspuuid.lib - Vista+ DMO/DSP related

C++ code:

#pragma comment(lib, "strmiids.lib")
#pragma comment(lib, "dmoguids.lib")
#pragma comment(lib, "msdmo.lib")
#pragma comment(lib, "wmcodecdspuuid.lib")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top