Christian Jonigkeit

Hi I am trying to build one of the Windows SDK Samples, namely the \Multimedia\DirectShow\Capture\PlayCap and get linker errors with the MSVCRTD.lib.

I am using Visual Studio 2005 and Vista 64

If have changed the project settings to use the include directory
C:\Program Files\Windows SDKs\v6.0\Include

and the the libary directory
C:\Program Files\Windows SDKs\v6.0\Lib\x64

The errors I get are:
Error 1 error LNK2001: unresolved external symbol _PIN_CATEGORY_PREVIEW playcap.obj
Error 2 error LNK2001: unresolved external symbol _MEDIATYPE_Video playcap.obj
Error 3 error LNK2001: unresolved external symbol _IID_IBaseFilter playcap.obj
Error 4 error LNK2019: unresolved external symbol __imp__MessageBoxW@16 referenced in function "long __cdecl FindCaptureDevice(struct IBaseFilter * *)" ( FindCaptureDevice@@YAJPAPAUIBaseFilter@@@Z) playcap.obj
Error 5 error LNK2001: unresolved external symbol _CLSID_VideoInputDeviceCategory playcap.obj
Error 6 error LNK2019: unresolved external symbol __imp__CoCreateInstance@20 referenced in function "long __cdecl FindCaptureDevice(struct IBaseFilter * *)" ( FindCaptureDevice@@YAJPAPAUIBaseFilter@@@Z) playcap.obj
Error 7 error LNK2001: unresolved external symbol _CLSID_SystemDeviceEnum playcap.obj
Error 8 error LNK2001: unresolved external symbol _IID_ICreateDevEnum playcap.obj
Error 9 error LNK2001: unresolved external symbol _IID_IMediaEvent playcap.obj
Error 10 error LNK2001: unresolved external symbol _IID_IVideoWindow playcap.obj
Error 11 error LNK2001: unresolved external symbol _IID_IMediaControl playcap.obj
Error 12 error LNK2001: unresolved external symbol _CLSID_CaptureGraphBuilder2 playcap.obj
Error 13 error LNK2001: unresolved external symbol _IID_ICaptureGraphBuilder2 playcap.obj
Error 14 error LNK2001: unresolved external symbol _CLSID_FilterGraph playcap.obj
Error 15 error LNK2001: unresolved external symbol _IID_IGraphBuilder playcap.obj
Error 16 error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function "void __cdecl ResizeVideoWindow(void)" ( ResizeVideoWindow@@YAXXZ) playcap.obj
Error 17 error LNK2019: unresolved external symbol __imp__CreateItemMoniker@12 referenced in function "long __cdecl AddGraphToRot(struct IUnknown *,unsigned long *)" ( AddGraphToRot@@YAJPAUIUnknown@@PAK@Z) playcap.obj
Error 18 error LNK2019: unresolved external symbol __imp__GetCurrentProcessId@0 referenced in function "long __cdecl AddGraphToRot(struct IUnknown *,unsigned long *)" ( AddGraphToRot@@YAJPAUIUnknown@@PAK@Z) playcap.obj
Error 19 error LNK2001: unresolved external symbol __imp__GetCurrentProcessId@0 MSVCRTD.lib
Error 20 error LNK2019: unresolved external symbol __imp__GetRunningObjectTable@8 referenced in function "long __cdecl AddGraphToRot(struct IUnknown *,unsigned long *)" ( AddGraphToRot@@YAJPAUIUnknown@@PAK@Z) playcap.obj
Error 21 error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function "long __stdcall WndMainProc(struct HWND__ *,unsigned int,unsigned int,long)" ( WndMainProc@@YGJPAUHWND__@@IIJ@Z) playcap.obj
Error 22 error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall WndMainProc(struct HWND__ *,unsigned int,unsigned int,long)" ( WndMainProc@@YGJPAUHWND__@@IIJ@Z) playcap.obj
Error 23 error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "long __stdcall WndMainProc(struct HWND__ *,unsigned int,unsigned int,long)" ( WndMainProc@@YGJPAUHWND__@@IIJ@Z) playcap.obj
Error 24 error LNK2019: unresolved external symbol __imp__IsIconic@4 referenced in function "long __stdcall WndMainProc(struct HWND__ *,unsigned int,unsigned int,long)" ( WndMainProc@@YGJPAUHWND__@@IIJ@Z) playcap.obj
Error 25 error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 referenced in function _WinMain@16 playcap.obj
Error 26 error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16 playcap.obj
Error 27 error LNK2019: unresolved external symbol __imp__GetMessageW@16 referenced in function _WinMain@16 playcap.obj
Error 28 error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function _WinMain@16 playcap.obj
Error 29 error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function _WinMain@16 playcap.obj
Error 30 error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function _WinMain@16 playcap.obj
Error 31 error LNK2019: unresolved external symbol __imp__GetLastError@0 referenced in function _WinMain@16 playcap.obj
Error 32 error LNK2019: unresolved external symbol __imp__RegisterClassW@4 referenced in function _WinMain@16 playcap.obj
Error 33 error LNK2019: unresolved external symbol __imp__LoadIconW@8 referenced in function _WinMain@16 playcap.obj
Error 34 error LNK2019: unresolved external symbol __imp__LoadCursorW@8 referenced in function _WinMain@16 playcap.obj
Error 35 error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function _WinMain@16 playcap.obj
Error 36 error LNK2019: unresolved external symbol __imp__CoInitializeEx@8 referenced in function _WinMain@16 playcap.obj
Error 37 error LNK2019: unresolved external symbol __imp__InterlockedExchange@8 referenced in function ___tmainCRTStartup MSVCRTD.lib
Error 38 error LNK2019: unresolved external symbol __imp__Sleep@4 referenced in function ___tmainCRTStartup MSVCRTD.lib
Error 39 error LNK2019: unresolved external symbol __imp__InterlockedCompareExchange@12 referenced in function ___tmainCRTStartup MSVCRTD.lib
Error 40 error LNK2019: unresolved external symbol __imp__GetStartupInfoA@4 referenced in function ___tmainCRTStartup MSVCRTD.lib
Error 41 error LNK2019: unresolved external symbol __imp__RaiseException@16 referenced in function "int __cdecl DebuggerProbe(unsigned long)" ( DebuggerProbe@@YAHK@Z) MSVCRTD.lib
Error 42 error LNK2019: unresolved external symbol __imp__DebugBreak@0 referenced in function "void __cdecl failwithmessage(void *,int,int,char const *)" ( failwithmessage@@YAXPAXHHPBD@Z) MSVCRTD.lib
Error 43 error LNK2019: unresolved external symbol __imp__WideCharToMultiByte@32 referenced in function "void __cdecl failwithmessage(void *,int,int,char const *)" ( failwithmessage@@YAXPAXHHPBD@Z) MSVCRTD.lib
Error 44 error LNK2019: unresolved external symbol __imp__IsDebuggerPresent@0 referenced in function "void __cdecl failwithmessage(void *,int,int,char const *)" ( failwithmessage@@YAXPAXHHPBD@Z) MSVCRTD.lib
Error 45 error LNK2001: unresolved external symbol __imp__IsDebuggerPresent@0 MSVCRTD.lib
Error 46 error LNK2019: unresolved external symbol __imp__MultiByteToWideChar@24 referenced in function "void __cdecl failwithmessage(void *,int,int,char const *)" ( failwithmessage@@YAXPAXHHPBD@Z) MSVCRTD.lib
Error 47 error LNK2019: unresolved external symbol __imp__lstrlenA@4 referenced in function "void __cdecl _RTC_AllocaFailure(void *,struct _RTC_ALLOCA_NODE *,int)" ( _RTC_AllocaFailure@@YAXPAXPAU_RTC_ALLOCA_NODE@@H@Z) MSVCRTD.lib
Error 48 error LNK2019: unresolved external symbol __imp__GetProcAddress@8 referenced in function "void __cdecl _RTC_AllocaFailure(void *,struct _RTC_ALLOCA_NODE *,int)" ( _RTC_AllocaFailure@@YAXPAXPAU_RTC_ALLOCA_NODE@@H@Z) MSVCRTD.lib
Error 49 error LNK2001: unresolved external symbol __imp__GetProcAddress@8 MSVCRTD.lib
Error 50 error LNK2019: unresolved external symbol __imp__LoadLibraryA@4 referenced in function "void __cdecl _RTC_AllocaFailure(void *,struct _RTC_ALLOCA_NODE *,int)" ( _RTC_AllocaFailure@@YAXPAXPAU_RTC_ALLOCA_NODE@@H@Z) MSVCRTD.lib
Error 51 error LNK2001: unresolved external symbol __imp__LoadLibraryA@4 MSVCRTD.lib
Error 52 error LNK2019: unresolved external symbol __imp__TerminateProcess@8 referenced in function ___report_gsfailure MSVCRTD.lib
Error 53 error LNK2019: unresolved external symbol __imp__GetCurrentProcess@0 referenced in function ___report_gsfailure MSVCRTD.lib
Error 54 error LNK2019: unresolved external symbol __imp__UnhandledExceptionFilter@4 referenced in function ___report_gsfailure MSVCRTD.lib
Error 55 error LNK2019: unresolved external symbol __imp__SetUnhandledExceptionFilter@4 referenced in function ___report_gsfailure MSVCRTD.lib
Error 56 error LNK2001: unresolved external symbol __imp__SetUnhandledExceptionFilter@4 MSVCRTD.lib
Error 57 error LNK2019: unresolved external symbol __imp__QueryPerformanceCounter@4 referenced in function ___security_init_cookie MSVCRTD.lib
Error 58 error LNK2019: unresolved external symbol __imp__GetTickCount@0 referenced in function ___security_init_cookie MSVCRTD.lib
Error 59 error LNK2019: unresolved external symbol __imp__GetCurrentThreadId@0 referenced in function ___security_init_cookie MSVCRTD.lib
Error 60 error LNK2019: unresolved external symbol __imp__GetSystemTimeAsFileTime@4 referenced in function ___security_init_cookie MSVCRTD.lib
Error 61 error LNK2019: unresolved external symbol __imp__HeapFree@12 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" ( _RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z) MSVCRTD.lib
Error 62 error LNK2019: unresolved external symbol __imp__HeapAlloc@12 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" ( _RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z) MSVCRTD.lib
Error 63 error LNK2019: unresolved external symbol __imp__GetProcessHeap@0 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" ( _RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z) MSVCRTD.lib
Error 64 error LNK2019: unresolved external symbol __imp__GetModuleFileNameW@12 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" ( _RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z) MSVCRTD.lib
Error 65 error LNK2019: unresolved external symbol __imp__VirtualQuery@12 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" ( _RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z) MSVCRTD.lib
Error 66 error LNK2019: unresolved external symbol __imp__FreeLibrary@4 referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" ( GetPdbDll@@YAPAUHINSTANCE__@@XZ) MSVCRTD.lib
Error 67 fatal error LNK1120: 61 unresolved externals Debug\PlayCap.exe

Thanks in advance


Re: DirectShow Development Linking problem with DirectShow Sample


Re: DirectShow Development Linking problem with DirectShow Sample

Christian Jonigkeit

Yes did that. Problem seems to be with x64, as I can build on 32.

I'll just develop on 32.