DirectShow camera demo

我在编译SDK自带的Cameracapture的例子时,出现 
==========   生成:   0   已成功,   1   已失败,   0   最新,   0   已跳过   ========== 
1> ------   已启动生成:   项目:   CameraCapture,   配置:   Release   Windows   Mobile   5.0   Pocket   PC   SDK   (ARMV4I)   ------ 
1> 正在链接... 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   IID_IMediaEvent 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   PIN_CATEGORY_STILL 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   CLSID_IMGSinkFilter 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   MEDIATYPE_Video 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   PIN_CATEGORY_CAPTURE 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   MEDIASUBTYPE_Asf 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   DMOCATEGORY_VIDEO_ENCODER 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   CLSID_DMOWrapperFilter 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   CLSID_VideoCapture 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   CLSID_FilterGraph 
1> graphmanager.obj   :   error   LNK2001:   无法解析的外部符号   CLSID_CaptureGraphBuilder 
1> Windows   Mobile   5.0   Pocket   PC   SDK   (ARMV4I)/Release/CameraCapture.exe   :   fatal   error   LNK1120:   11   个无法解析的外部命令 
1> 生成日志保存在“file://d:/Program   Files/Windows   CE   Tools/wce500/Windows   Mobile   5.0   Pocket   PC   SDK/Samples/CPP/Win32/Cameracapture/Windows   Mobile   5.0   Pocket   PC   SDK   (ARMV4I)/Release/BuildLog.htm” 
1> CameraCapture   -   12   个错误,0   个警告 
==========   生成:   0   已成功,   1   已失败,   0   最新,   0   已跳过   ========== 

加上

#include   <dshow.h> 
#pragma   comment(lib, "Strmiids.lib ")在mobiel5 dubug下调试不出错,但是其他情况还出现这样的错误:

错误 1 error LNK2001: 无法解析的外部符号 DMOCATEGORY_VIDEO_ENCODER EricCamera.obj Camera

再加上

#include <Dmoreg.h>
#pragma comment(lib,"Dmoguids.lib")
 

 

调试成功。

 

参考:

http://topic.okbase.net/200809/2008090913/3446616.html

http://topic.csdn.net/u/20070424/23/79aca4e4-dcb1-425d-b36c-cf426e12493e.html

 

posted @ 2010-03-06 14:40  张兴业  阅读(387)  评论(0编辑  收藏  举报