0

I have an MFC project, and I'm trying to use DirectShow.

However, when I build my project, I have the following linker errors

MFC_ATMApplicationDlg.obj : error LNK2001: unresolved external symbol _IID_IGraphBuilder
MFC_ATMApplicationDlg.obj : error LNK2001: unresolved external symbol _IID_ICaptureGraphBuilder2
MFC_ATMApplicationDlg.obj : error LNK2001: unresolved external symbol _CLSID_CaptureGraphBuilder2
MFC_ATMApplicationDlg.obj : error LNK2001: unresolved external symbol _CLSID_FilterGraph

How can I fix these errors?

Mansuro
  • 4,558
  • 4
  • 36
  • 76

1 Answers1

1

You fix this the same way you fix linker errors: you add missing library:

#pragma comment(lib, "strmiids.lib")

e.g. the way it is done here, or alternatively you can add the same dependency using Project Settings window.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • I already added that but I still have the same problem, I fixed this, strangely enough, when I include DirectShow code in non-MFC classes, the issue disappears – Mansuro Sep 11 '15 at 02:00