vs2010+64+osg3.2.1 Five Plugins Dae compilation

Source: Internet
Author: User

vs2010+64+osg3.2.1 Five Plugins Dae compilation

Transferred from: http://blog.csdn.net/nuaaqsm0915/article/details/38978971

The compilation of the Plugins Dae is really a waste of time. Repeatedly tried many times, and finally compiled successfully, the special summary is as follows.

First look at the plugin Dae. The Plugin Dae is used to read writes to 3D files with the Dae suffix, and compiles osgdb_dae.dll and osgdb_daed.dll two dynamic-link libraries under the osgPlugins-3.2.1 directory (3.2.1 is the OSG version number). While Dae files follow the Collada standard, Collada is an open standard, originally used for 3D software data exchange, initiated by SCEA, and is now supported by many well-known manufacturers such as Autodesk, XSi and so on.

For COLLADA, you can log in to the official website: Http://en.wikipedia.org/wiki/COLLADA

Through the official website, for the operation of the Collada format file, there are a variety of library files, such as: FCollada, Opencollada (c + +), Pycollada (Python), Stormenginec (JavaScript), etc., The Colladadom library in which OSG is used.

In the CMake to the colladadom of the relevant options to be properly set up for the subsequent successful compilation plugin Dae lay the foundation, colladadom this library, from the configuration, to use the Boost library, Pcre library, Libxml Library, and other similar configuration:

Relevant options mean:

BOOST:

The Boost library is a repository of C + + standard libraries, a portable, source-code C + + library that is one of the development engines of the C + + standardization process, and part of the content is gradually incorporated into the standard library as boost continues to mature. Boost Library official website: http://www.boost.org/

PCRE:

PCRE (Perl Compatible Regular Expressions Chinese Meaning: Perl language compatible regular Expressions) is a library of regular expression functions written in C, written by Philip Heyzer. Pcre is a lightweight library of functions that is much smaller than the regular expression library in boost. The pcre is very easy to use and also powerful, with performance exceeding the POSIX regular expression library and some classic regular expression libraries [1].

LIBXML:

is an XML file parsing library. Can read and write access to an XML file

According to the above configuration, the use of OSG self-brought Lib file, for the Plugins Dae compilation, there are many errors, mainly link library errors, similar errors are as follows:

According to the hint with DUMPBIN tools to analyze libcollada14dom21.lib, found that is x86 version, no 64-bit version, no way, download colladadom2.1 version, decompression, under the DOM\PROJECTS\VC9 have engineering documents, In the external-libs below is the boost, Pcre, LIBXML2 and other libraries of the Lib file, which is colladadom used by the third-party library files.

Open colladadom2.1 project file, set X64 to compile, colladadom compile does not pass. Hint link error, original colladadom with the third-party library is also x86 version, no way, Only download pcre7.6,pcre7.6 can generate VS2010 project files with CMake, compile relatively simple, build 64-bit version of library files after compiling: Pcred.lib, Pcre.lib, Pcrecppd.ib, Pcrecpp.lib, Pcreposixd.lib Pcreposix.lib.

Download boost1.5.5, the compilation of boost1.5.5, of course, the process of compiling is very laborious, from the Internet to find a bit, specific methods see: http://blog.chinaunix.net/ Uid-22301538-id-3158997.html, this information is introduced in the X86 version, 64-bit version of the need to add an option in the Bjam compilation parameters: Address-model=64, you can compile into 64-bit version. When the compilation is complete, generate a bunch of Lib library files, where boost_filesystem-vc100-mt-1_55.lib, Boost_filesystem-vc100-mt-gd-1_55.lib, Boost_ System-vc100-mt-1_55.lib, Boost_system-vc100-mt-gd-1_55.lib is the library file we need, note that with GD is the debug version.

Download libxml2-2.9.0. libxml2-2.9.0 's compilation has really cost a few twists. After downloading, unzip, in its WIN32\VC10 directory, there is a vs engineering file. Set to x64 mode compile always pass no, still a bunch of link errors. Later found the problem was libxml and quoted the Libconv library, Libconv library must be the library file Libiconv.lib import before the line, downloaded on the Internet, still compiled pass, but with the DUMPBIN analysis found, rely on, download Libiconv.lib is x86 version, and Internet search a large circle, found no x64 version. No way, can only download Libiconv.lib library itself compiled x64 version.

Download libiconv-1.14 from the Internet. Start compiling libiconv, found to be Linux under the project, under Windows compilation is more troublesome. Also to the online search information, find its compilation method: Http://blog.csdn.net/wesleyluo/article/details/8593409. According to the online method, the libiconv-1.14 compiled successfully. Get the library file libiconv.lib. In the libxml2-2.9.0 project file, set up in the linker-input entry, the libiconv.lib you just generated entered. Then compile libxml2-2.9.0, pass successfully, get libxml2.lib.

So far, the library files required by Colladadom are finally all compiled. In the cmake inside the settings, note to use their own compiled lib file, do not use the OSG library files, the reference configuration is as follows:

After the configuration, after recompiling the plugins Dae, compiled through, loaded a DAE model, to be able to display properly, and finally finished!

Compiled very hard, there are many gains, summarized as follows:

1, plugins Dae compile requires Colladadom library, and colladadom need boost library, Pcre library, Libxml Library, and Libxml library needs Libconv Library, which fully embodies the characteristics of open source projects, different libraries reference each other.

2, the above different libraries its version number is correct, the version of the old or the new may lead to errors, the main performance due to the function name, the argument name inconsistency caused the link error or failed to run.

3, the location of the library file version to correct, x64 bit to refer to x64, x86 reference x86, or error prone.

4, we should make full use of the network to grasp the basic steps of the Open Source Library compilation, but also to consider the rationale behind it, can modify their own.

5, to have patience.

Compiled Libiconv:

http://download.csdn.net/detail/nuaaqsm0915/7848621

Compiled Pcre:

http://download.csdn.net/detail/nuaaqsm0915/7848579

Compiled LIBXML2:

http://download.csdn.net/detail/nuaaqsm0915/7848635

Compiled colladadom2.1:

http://download.csdn.net/detail/nuaaqsm0915/7848611

Compiled Osgdb_dae.dll:

http://download.csdn.net/detail/nuaaqsm0915/7849641

vs2010+64+osg3.2.1 Five Plugins Dae compilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.