c++ - Selecting a Capture Device Using the System Device Enumerator -
i tring use link: http://msdn.microsoft.com/en-us/library/dd377566%28v=vs.85%29.aspx, select capturing device.
works on visual studio, throws following error qt:
test.obj : error lnk2005: _main defined in main.obj test.obj : error lnk2019: unresolved external symbol __imp__cocreateinstance@20 referenced in function "long __cdecl enumeratedevices(struct _guid const &,struct ienummoniker * *)" (?enumeratedevices@@yajabu_guid@@papauienummoniker@@@z) test.obj : error lnk2019: unresolved external symbol __imp__variantclear@4 referenced in function "void __cdecl displaydeviceinformation(struct ienummoniker *)" (?displaydeviceinformation@@yaxpauienummoniker@@@z) test.obj : error lnk2019: unresolved external symbol __imp__variantinit@4 referenced in function "void __cdecl displaydeviceinformation(struct ienummoniker *)" (?displaydeviceinformation@@yaxpauienummoniker@@@z) test.obj : error lnk2019: unresolved external symbol __imp__couninitialize@0 referenced in function _main test.obj : error lnk2019: unresolved external symbol __imp__coinitializeex@8 referenced in function _main
i'm using windows 7 & qt 5.0.2.
any appreciated thanks.
searching "cocreateinstance unresolved external" on google , using first link returned:
http://social.msdn.microsoft.com/forums/en-us/vcgeneral/thread/5fc032e1-86d8-43c7-870b-f10599000605/
i spotted third comment indicates link against "ole32.lib".
your reply comment above indicates "oleaut32.lib" required.
also make sure link against "strmiids.lib".
to sum up, required libraries are:
- ole32.lib
- oleaut32.lib
- strmiids.lib
Comments
Post a Comment