日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > windows >内容正文

windows

Ogre SourceCode Compile by Windows VS2005

發(fā)布時(shí)間:2024/3/26 windows 52 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ogre SourceCode Compile by Windows VS2005 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

以下為實(shí)踐過(guò)程;

一 , Download OgreSourceCode

?? http://www.ogre3d.org/download/source

?? 選擇OGRE Source For Windows

?

二,研究BuildingOgre.txt

?? 解壓下載的Ogre 源碼之后,可以在根目錄下找到BuildingOgre.txt,按照BuildingOgre.txts

?? 所介紹的開始進(jìn)行compile;

?

三,? Getting CMake

?? Downfrom http://www.cmake.org,? 安裝cmake, 安裝成功之后,可以運(yùn)行cmake-gui來(lái)進(jìn)行編譯工作;

?? 打開cmake-gui, 指定

Where is the source code ---- Ogre Source code 所在目錄;假設(shè)為D:\Sourcecode\ogre\ogre_src?????????

? ?Where to build the binaries ---- 可以新建一個(gè)目錄,來(lái)指定此目錄,假設(shè)為

D:\Sourcecode\ogre\buildOrge

?

四, Gettingdependencies

? 下載編譯Ogre需要的一些lib and dll,這里需要重點(diǎn)講一下;

?

?? 1,Dependencies

?? http://www.ogre3d.org/download/source中提供了一個(gè)DependenciesSource Repository with CMake build system 這樣的一個(gè)壓縮包,解壓之后名為Dependencies,在其中包含了Cg, FreeImage, freeType, ois,zlib, zziplib; ?將Dependencies 放在D:\Sourcecode\ogre\buildOrge

目錄下,使用VS2005 編譯Dependencies 所包含的所有l(wèi)ib;

?

?? 下面來(lái)處理Dependencies中不包含的那些庫(kù)文件;

?? 2,DirectX

? ???安裝Microsoft DirectX SDK

??

?? 3,POCO

?? http://pocoproject.org/

?? 解壓之后,運(yùn)行build_vs80.cmd, 即使用VS2005編譯poco

?? 同時(shí),在cmake-gui中,點(diǎn)擊Add Entry, 新建一個(gè)path, 可以命名為POCO_HOME, 指向poco所在的文件夾,這樣在編譯的時(shí)候,可以找到poco;??

?

?? 4,CPPUNIT

?? http://sourceforge.net/projects/cppunit/files/cppunit/

?? 加壓之后,進(jìn)入src, 使用VS2005 打開CppUnitLibraries.dsw, 編譯整個(gè)工程;

?? 編完之后,在cmake-gui中,點(diǎn)擊Add Entry, 新建一個(gè)path, 可以命名為CPPUNIT_HOME, 指向cppunit所在的文件夾,這樣在編譯的時(shí)候,可以找到cppunit;

?

?? 5,?Doxygen

?? http://www.stack.nl/~dimitri/doxygen/download.html

?download 適合windows的安裝文件,進(jìn)行安裝;

?

? 6,Boost

?? http://www.boost.org/

??download適合windows的zip or 7z;

? ?直接運(yùn)行bootstrap.bat, 會(huì)由于Path的緣故而fail, 所以直接打開 開始-程序-Microsoft Visual Studio 2005-Visual Studio Tools – Visual Stual2005 命令提示, 這個(gè)VS2005就為我們?cè)O(shè)定好了相應(yīng)的path,執(zhí)行ootstrap.bat;

?? 運(yùn)行bootstrap.bat成功,將得到bjam.exe, 直接雙擊運(yùn)行bjam.exe會(huì)出現(xiàn)很多error, 找不到相關(guān)文件之類的,可以通過(guò)增加path來(lái)解決,同樣為了方便,進(jìn)入Visual Stual2005 命令提示,轉(zhuǎn)到bjam.exe 所在目錄,

運(yùn)行

bjam --toolset=msvc-8.0 --build-type=complete --layout=versioned

(bjam --toolset=msvc-8.0?--without-python --build-type=complete??link=shared??threading=multi install)

toolset 選項(xiàng)指定編譯器,VS2005指定為msvc-8.0

build-type 選項(xiàng)指定編譯類型

?PS: 環(huán)境變量Path被破壞后,會(huì)使VC\bin\vcvars32.bat,加載path fail, ?引起編譯錯(cuò)誤;


CMakedepends on the following environment variables to find Boost succesfully:
BOOST_ROOT?(d:\ boost)
BOOST_INCLUDEDIR?(d:\ boost)
BOOST_LIBRARYDIR?(d:\ boost\libs)
Well, at least?
BOOST_ROOT, but it can't hurt to set the twoothers.

如此編譯完成之后,在cmake-gui中,點(diǎn)擊Add Entry, 新建多個(gè)path, 分別為BOOST_ROOT

BOOST_INCLUDEDIR, BOOST_LIBRARYDIR

?

? 7, GLSL

? Optimizer: GLSL Optimizer http://github.com/aras-p/glsl-optimizer/

? 使用cmake-gui 產(chǎn)生Project.sln, 使用VS2005打開,進(jìn)行編譯,發(fā)現(xiàn)找不到stdint.hstdboo.h,

? 在根目錄include下會(huì)有c99這個(gè)文件夾,將c99添加到包含目錄;

發(fā)現(xiàn)找不到getopt.h, 將src\getopt 添加到包含目錄;

?

使用VS2005編譯過(guò)程中,可能會(huì)遇到一些問(wèn)題,主要涉及VS2005對(duì)c99支持的不是

很好、 wgl相關(guān)——VS2005默認(rèn)缺少一些opengl 開發(fā)庫(kù), 需要進(jìn)行添加,注意修改就OK;

?

? 8, HLSL

??HLSL2GLSLhttp://hlsl2glslfork.googlecode.com/

?

? 9, tbb

? ThreadingBuilding Blocks http://www.threadingbuildingblocks.org/

?

? 10, SoftImage

? Softimage SDKneeded for building XSIExporter <FALSE>

?

?

五:cmake-gui Configureand Generate

?

六:BuildingOgre

在D:\Sourcecode\ogre\buildOrge 下找到OGRE.sln, 用VS2005打開,進(jìn)行編譯;

?

If you havedoxygen installed and CMake picked it up,then there will be an additional build target called doc whichyou can optionally build. 使用VS2005 select and build the target?'DOC' ;

?

七:InstallingOgre

? ??In Visual Studio, just select and build thetarget 'INSTALL'. This will create the folder 'sdk' inside your build directoryand copy all the required libraries there.


更多詳細(xì)編譯可參考官方文檔http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Building+Ogre

??


總結(jié)

以上是生活随笔為你收集整理的Ogre SourceCode Compile by Windows VS2005的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。