linux下collada-dom编译,Building Collada
文章聲明:由于COLLADA以及IDE版本的更新,本文盡量以最新的版本為準,但是不保證一定適用于當前存在的版本,僅就一些編譯上遇到的問題給出一些解答,希望能對需要進行COLLADA編程的人員帶來一些幫助~
1、Downloading the COLLADA DOM
首先從官網上下載一個最新版本的COLLADA DOM:
https://collada.org/mediawiki/index.php/COLLADA_-_Digital_Asset_and_FX_Exchange_Schema
2、編譯:
環境:windows(visio studio 2010)
(1)解決方案路徑:
\projects
有時可能單獨需要引入daeZAEUncompressHandler.cpp和daeZAEUncompressHandler.h,這兩個文件可以分別在\src\dae文件夾以及\include\dae文件夾中找到。
該解決方案中輸出目錄默認在\build中可以找到。
注意:編譯自己的COLLADA工程
你可以在COLLADA的SDK包中找到類似vc8這樣的工程文件,這種工程文件時為Visual C++ 8 (Visual Studio 2005).準備的,如果你使用的是Visual C++ 9 (Visual Studio 2008),文件中也會有類似名稱的工程文件。
在這個文件夾中你可以回看到某些文件的名稱中包含"1.4" 或者"14"之類與COLLADA有關的文件名,如果你使用的是 COLLADA 1.5, 那么就用包含"1.5" 或者"15" 這樣文件名的文件代替。.
(2)設置 include directories
§ ?在你的C/C++項目設置中,加入下面幾行頭文件路徑到General標簽下的Additional include directories中:
\include
\include\1.4
\external-libs\boost
(3)設置 preprocessor definitions § 在C/C++ 工程配置中做以下改動,將下面這幾行編碼加入到Preprocessor 標簽下的Preprocessor Definitionsf配置中:
BOOST_ALL_NO_LIB
PCRE_STATIC
DOM_INCLUDE_LIBXML
(4)用靜態鏈接方式鏈接COLLADA DOM
§ 把下面這幾行加入到Linker ->General->Additional library directories
\build\vc8-1.4 (release) or \build\vc8-1.4-d (debug)
\external-libs\libxml2\win32\lib
\external-libs\pcre\lib\vc8
\external-libs\minizip\win32\lib\
\external-libs\boost\lib\vc8
§ 把下面這幾行加入到Linker ->Input ->Additional Dependencies:
libcollada14dom22-s.lib (release) or libcollada14dom22-sd.lib (debug)
libxml2_a.lib
zlib.lib
wsock32.lib
pcre.lib (release) or pcre-d.lib (debug)
pcrecpp.lib (release) or pcrecpp-d.lib (debug)
minizip.lib (release) or minizip-d.lib (debug)
libboost_filesystem.lib (release) or libboost_filesystem-d.lib (debug)
libboost_system.lib (release) or libboost_system-d.lib (debug)
注:上面設置中pcre-d.lib 和pcrecpp-d.lib在VS2010中需要去掉中間的橫杠,即為:pcred.lib 和pcrecppd.lib
Linker warnings/Runtime errors
When you build an application that links against the DOM statically, you might get a Visual Studio warning like this:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
If you ignore this warning, you'll then get a runtime failure message that says
This application has failed to start because MSVCR80.dll was not found. ...
If you have this problem, go to theIgnore Specific Library section in the linker settings of your project and add msvcrt. Then relink your project. The link warning should be gone and your application should run fine.
(5)用動態鏈接庫方式鏈接COLLADA DOM 注意:如果你已經選擇了使用靜態鏈接方式鏈接COLLADA DOM就可以不用這種方式,這兩種方式中選擇一種就可以了 § 把下面這幾行加入到C/C++ project configuration->Preprocessor->Preprocessor Definitions: DOM_DYNAMIC § 把下面這幾行加入到Linker->General->Additional library directories: \build\vc8-1.4 (release) or \build\vc8-1.4-d (debug) \external-libs\boost\lib\vc8 § 把下面這幾行加入到Linker->Input ->Additional Dependencies: libcollada14dom22.lib (release) or libcollada14dom22-d.lib (debug) libboost_filesystem.lib (release) or libboost_filesystem-d.lib (debug) libboost_system.lib (release) or libboost_system-d.lib (debug)
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的linux下collada-dom编译,Building Collada的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 和catch的区别_BIO、NIO、AI
- 下一篇: python 谷歌地图api_《Pyth