如何编译 CETK下面的 CameraApp

来源:互联网 发布:淘宝导航条怎么改颜色 编辑:程序博客网 时间:2024/06/08 12:15


首先打开vs2005 private目录下点击右键 open build window 打开命令行编译窗口。

 

然后CD E:/WINCE600/PRIVATE/TEST/MULTIMEDIA/DIRECTX/DSHOW/CAMERA目录下面。

 

 

首先执行build命令。

如果是第一次编译的话它可能会产生这样一个错误:

The error msg was ... don't know how to make....captureframework.lib.
And so I tried to build the ...dshow/camera/framework/default directory in
order to create the errored captureframework.lib file. And then another error
msg was happened. 'cannot open program database
'e:/wince600/osdesign/..../captureframework.pdb'. Of source, there was no
such file at the path.

 

你需要的只是建立一个那样的目录。

 

再次执行build命令 它会产生这样的错误!

don't know how to build STREEUTILS.LIB

 解决方法:

E:/WINCE600/PUBLIC/OSTEST/OAK/LIB/ARMV4I/RETAIL下面的STREEUTILS.LIB复制到E:/WINCE600/OSDesigns/OSAs6410Guide/OSAs6410Guide/Wince600/SMDK6410_ARMV4I/OAK/lib/ARMV4I/retail文件夹下面。

 

再次执行build命令

它可能会产生这样的错误:(如果没有产生就继续往下面看吧)

error C2039: 'CoDisconnectObject' : is nota member of '`global namespace''

error C2873: 'CoDisconnectObject' : symbolcannot be used in a using-declaration

………………………..

这个错误的原因是:在wince600/others/atl8/include/atlcore.h文件中定义了这样的一段:

#if !defined(_WIN32_WCE) ||(!defined(_ATL_STATIC_LIB_IMPL) && !defined(_ATL_DLL_IMPL) &&defined(_CE_DCOM))

using ::CoDisconnectObject;

using ::CoInitialize;

using ::CoRevokeClassObject;

using ::CoRegisterClassObject;

using ::CoReleaseMarshalData;

using ::CoMarshalInterface;

using ::CoUnmarshalInterface;

using ::OleSaveToStream;

using ::OleLoadFromStream;

#endif // !defined(_WIN32_WCE) ||(!defined(_ATL_STATIC_LIB_IMPL) && !defined(_ATL_DLL_IMPL) &&defined(_CE_DCOM)

 

定义这个是因为我们的CE 支持一些功能。 见里面的一句话:http://www.tech-archive.net/Archive/WindowsCE/microsoft.public.windowsce.embedded.vc/2008-03/msg00042.html

 

Looking at the ATL file you're hittingerrors, those fcns are only brought
in when this #ifdef is set.
#if !defined(_WIN32_WCE) || (!defined(_ATL_STATIC_LIB_IMPL) &&
!defined(_ATL_DLL_IMPL) && defined(_CE_DCOM))
--
We have this ifdef because those fcns are supported on CE devices that
support the full cross-proc COM. So looks like you have _WIN32_WCE defined
to get the fcns, but didn't build with full DCOM to get the actual fcn
definitions?

 

解决这个问题的方法:

查找_CE_DCOM宏的定义, 并把它全部注释掉。

它的定义在WINCE600/OTHERS/ATL8/INCLUDE/ATLDEFACE.H53 78行。

 

再次执行build命令

它这次报的错误主要是缺少某些库(lib)。

解决方法是: CDPRIVATE/TEST/MULTIMEDIA/DIRECTX/DSHOW/COMMON/LIBS目录下对应的文件夹下面执行build命令。

 

LIB目录对应目录下面执行build命令后, 再退回到camera目录下面再次执行build命令, 如果再报缺少lib的话再次到PRIVATE/TEST/MULTIMEDIA/DIRECTX/DSHOW/COMMON/LIBS下找到对应的文件夹build一下。

 

最后在camera下执行build命令编译成功

(因为在最后编译的过程中试过了很多方法, 很多的错误信息都丢失了, 所以没有贴出)

 

E:/WINCE600/OSDesigns/OSAs6410Guide//Wince600/SMDK6410_ARMV4I/OAK/target/ARMV4I/retail下找到编译成功的文件。