vs2013怎么vs2013配置opencv3.0gre,我是新手求教

用户名:sdfwds4
访问量:11186
注册日期:
阅读量:1297
阅读量:3317
阅读量:461658
阅读量:1145937
51CTO推荐博文
1、下载软件
cmake-2.8.10:http://cmake.org/cmake/resources/software.html
DirectX(可选,见下面):/download/A/E/7/AE743F1F-632B--AA1BB3458E31/DXSDK_Jun10.exe
OGRE v1.8.1:http://sourceforge.net/projects/ogre/?source=dlp
OGRE 依赖库:http://www.ogre3d.org/forums/viewtopic.php?f=1&t=54533
boost_1_53_0.7z:http://sourceforge.net/projects/boost/files/boost/1.53.0/
2、安装DXSDK
安装DXSDK,下载地址见上面,也可以使用绿色版的DX。如果使用的是绿色版的dx,需要在环境变量添加DXSDK_DIR,设置为包含Lib和Include文件夹的DirectX目录,比如我的是H:\Lib\DirectX9\。使用直接安装版的话就不需要那么麻烦了。
3、编译OGRE需要的boost库中几个库
解压boost库到目标目录,我的是H:\Lib\boost_1_53_0\,注意boost_1_53_0目录下包含boost和tools等目录。打开vs2012的命令行工具(菜单中 Microsoft Visual Studio 2012- & Visual Studio Tools -& VS2012 开发人员命令提示),切换到boost库的解压目录(输入H:回车,再输入cd&Lib\boost_1_53_0\回车),编译bjam(输入bootstrap.bat回车),等待一分多钟后,开始编译boost库(输入bjam stage --toolset=msvc-11.0 --with-date_time --with-thread回车)。等待几分钟后,boost_1_53_0目录下的stage目录就出现几个lib文件,OGRE需要的thread库和date_time库就编译出来了。
4、编译OGRE依赖库
将OGRE解压到目标目录,我的是H:\Lib\ogre_src_v1-8-1\,注意ogre_src_v1-8-1目录下有Tools和Samples等目录。解压OGRE依赖库到H:\Lib\ogre_src_v1-8-1\目录下,并改名为Dependencies,注意Dependencies是和OgreMain是在同级,并且Dependencies目录下有src和lib等目录。用VS2012打开Dependencies中src目录里的OgreDependencies.VS2010.sln,分别编译出来Release和Debug版的lib出来,再归集在Dependencies的lib目录(Release和Debug分开放),dll归集到Dependencies的bin目录。lib文件在编译OGRE程序时会自动链接,dll可能要手工复制到OGRE程序的运行目录。
如果在项目属性的常规中的平台工具集选择的是“Visual Studio 2012 - Windows XP (v110_xp)”的话,编译OIS项目可能会出现C2061错误:
C:\Program&Files&(x86)\Microsoft&SDKs\Windows\v7.1A\include\objidl.h(11280):&error&C2061:&语法错误:&标识符“__RPC__out_xcount_part”&C:\Program&Files&(x86)\Microsoft&SDKs\Windows\v7.1A\include\objidl.h(11284):&error&C2061:&语法错误:&标识符“__RPC__in_xcount_full”&C:\Program&Files&(x86)\Microsoft&SDKs\Windows\v7.1A\include\objidl.h(11486):&error&C2061:&语法错误:&标识符“__RPC__out_xcount_part”&C:\Program&Files&(x86)\Microsoft&SDKs\Windows\v7.1A\include\objidl.h(11490):&error&C2061:&语法错误:&标识符“__RPC__in_xcount_full”&C:\Program&Files&(x86)\Microsoft&SDKs\Windows\v7.1A\include\objidl.h(11692):&error&C2061:&语法错误:&标识符“__RPC__out_xcount_part”&C:\Program&Files&(x86)\Microsoft&SDKs\Windows\v7.1A\include\objidl.h(11696):&error&C2061:&语法错误:&标识符“__RPC__in_xcount_full”&C:\Program&Files&(x86)\Microsoft&SDKs\Windows\v7.1A\include\objidl.h(13063):&error&C2061:&语法错误:&标识符“__RPC__inout_xcount”&
&请将项目属性的“VC++ 目录”中的包含目录的地址复制添加到“C/C++ -& 常规”中的附加包含目录地址中所有地址的前面,注意要用英文分号分隔。这样就不会有这错误了。
5、生成OGRE的VS2012解决方案文件
打开cmake-gui.exe,将OGRE目录下的CMakeLists.txt文件拖放到cmake-gui.exe界面上,点击configure按钮,配置如下
点击Finish按钮等待进度条完成之后再次点击configure按钮,最后点击generate按钮即可生成可以在VS2012的工程文件。
5、编译OGRE
用VS2012打开OGRE目录下的OGRE.sln,编译。如果在编译过程找不到boost库头文件或者在链接过程中的找不到boost库lib文件,添加第3步相关的目录。
&参考:.cn/s/blog_6ece437a01019flx.html
了这篇文章
类别:┆阅读(0)┆评论(0)开源游戏引擎 Ogre 真没落了吗? - 知乎147被浏览22516分享邀请回答251 条评论分享收藏感谢收起616 条评论分享收藏感谢收起查看更多回答ogre|LOFTER(乐乎) - 让兴趣,更有趣
LOFTER for ipad —— 让兴趣,更有趣
下载移动端
关注最新消息
&nbsp&nbsp被喜欢
&nbsp&nbsp被喜欢
{list posts as post}
{if post.type==1 || post.type == 5}
{if !!post.title}${post.title|escape}{/if}
{if !!post.digest}${post.digest}{/if}
{if post.type==2}
{if post.type == 3}
{if !!post.image}
{if post.type == 4}
{if !!post.image}
{if !!photo.labels && photo.labels.length>0}
{var wrapwidth = photo.ow < 500?photo.ow:500}
{list photo.labels as labs}
{var lbtxtwidth = Math.floor(wrapwidth*(labs.ort==1?labs.x:(100-labs.x))/100)-62}
{if lbtxtwidth>12}
{if !!labs.icon}
{list photos as photo}
{if photo_index==0}{break}{/if}
品牌${make||'-'}
型号${model||'-'}
焦距${focalLength||'-'}
光圈${apertureValue||'-'}
快门速度${exposureTime||'-'}
ISO${isoSpeedRatings||'-'}
曝光补偿${exposureBiasValue||'-'}
镜头${lens||'-'}
{if data.msgRank == 1}{/if}
{if data.askSetting == 1}{/if}
{if defined('posts')&&posts.length>0}
{list posts as post}
{if post_index < 3}
{if post.type == 1 || post.type == 5}
{if !!post.title}${post.title|escape}{/if}
{if !!post.digest}${post.digest}{/if}
{if post.type == 2}
{if post.type == 3}
{if post.type == 4}
{if post.type == 6}
{if drlist.length>0}
更多相似达人:
{list drlist as dr}{if drlist.length === 3 && dr_index === 0}、{/if}{if drlist.length === 3 && dr_index === 1}、{/if}{if drlist.length === 2 && dr_index === 0}、{/if}{/list}
暂无相似达人,
{if defined('posts')&&posts.length>0}
{list posts as post}
{if post.type == 2}
{if post.type == 3}
{if post.type == 4}
{if post.type == 6}
this.p={ currentPage:1,pageNewMode:true,isgooglead3:false,ishotrecompost:false,visitorId:0, first:'',tag:'ogre',recommType:'new',recommenderRole:0,offset:16,type:0,isUserEditor:0,};

我要回帖

更多关于 vs2013配置opencv 的文章

 

随机推荐