DirectShow : Linker Error
-
When am building my application using DirectX(DirectShow) components, am getting the following Linker errors: Linking... error LNK2001: unresolved external symbol _IID_IMediaEvent error LNK2001: unresolved external symbol _IID_IMediaControl error LNK2001: unresolved external symbol _CLSID_FilterGraph error LNK2001: unresolved external symbol _IID_IGraphBuilder Debug/trial_DShow.exe : fatal error LNK1120: 4 unresolved externals Can anyone help in what scenario does the above errors pitch in.?? Thanks, Pramod.
-
When am building my application using DirectX(DirectShow) components, am getting the following Linker errors: Linking... error LNK2001: unresolved external symbol _IID_IMediaEvent error LNK2001: unresolved external symbol _IID_IMediaControl error LNK2001: unresolved external symbol _CLSID_FilterGraph error LNK2001: unresolved external symbol _IID_IGraphBuilder Debug/trial_DShow.exe : fatal error LNK1120: 4 unresolved externals Can anyone help in what scenario does the above errors pitch in.?? Thanks, Pramod.
Hi, You have to link the needed libs. Think that you have to add strmiids.lib explicity in the linker options Hope that this will help you Sujan
-
When am building my application using DirectX(DirectShow) components, am getting the following Linker errors: Linking... error LNK2001: unresolved external symbol _IID_IMediaEvent error LNK2001: unresolved external symbol _IID_IMediaControl error LNK2001: unresolved external symbol _CLSID_FilterGraph error LNK2001: unresolved external symbol _IID_IGraphBuilder Debug/trial_DShow.exe : fatal error LNK1120: 4 unresolved externals Can anyone help in what scenario does the above errors pitch in.?? Thanks, Pramod.
Usually, the link error 2001 means that you didn't link libraries required. The help file of the directshow has a page "Setting Up the Build Environment". Read this page and you'll find these libraries required: Strmiids.lib Quartz.lib ( not required if you don't call AMGetErrorText(), can be omitted in your case. ) If you don't know how to link these libraries, a simple way is provided in the following: 1. Click the Menu: (In Visual C++ 6.0) Tools -> Options -> Directories, and then choose item of the combobox below the text "Show Directories for" Library Files and set the path of these 2 libraries. (In Visual Studio .Net) Tools -> Options -> Projects -> VC++ Directories , and then choose item of the combobox below the text "Show Directories for" Library Files and set the path of these 2 libraries. 2. Add the following codes to where you want to include some files(Ex: You can add them in stdafx.h):
#include "Dshow.h" #pragma comment ( lib, "Strmiids" ) #pragma comment ( lib, "Quartz" )
good luck!