Sophie

Sophie

distrib > Fedora > 17 > x86_64 > by-pkgid > 989fc7273cb69ce143e3e933773e129c > files > 201

assimp-devel-2.0.863-6.20110824svn.fc17.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Assimp: Installation</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Assimp
   &#160;<span id="projectnumber">v2.0 (November 2010)</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Installation </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="install_prebuilt"></a>
Using the pre-built libraries with Visual C++ 8/9</h1>
<p>If you develop at Visual Studio 2005 or 2008, you can simply use the pre-built linker libraries provided in the distribution. Extract all files to a place of your choice. A directory called "ASSIMP" will be created there. Add the ASSIMP/include path to your include paths (Menu-&gt;Extras-&gt;Options-&gt;Projects and Solutions-&gt;VC++ Directories-&gt;Include files) and the ASSIMP/lib/&lt;Compiler&gt; path to your linker paths (Menu-&gt;Extras-&gt;Options-&gt;Projects and Solutions-&gt;VC++ Directories-&gt;Library files). This is neccessary only once to setup all paths inside you IDE.</p>
<p>To use the library in your C++ project you have to include either &lt;<a class="el" href="assimp_8hpp.html" title="Defines the C++-API to the Open Asset Import Library.">assimp.hpp</a>&gt; or &lt;<a class="el" href="assimp_8h.html" title="Defines the C-API to the Open Asset Import Library.">assimp.h</a>&gt; plus some others starting with &lt;<a class="el" href="ai_types_8h.html" title="Basic data types and primitives, such as vectors or colors.">aiTypes.h</a>&gt;. If you set up your IDE correctly the compiler should be able to find the files. Then you have to add the linker library to your project dependencies. Link to &lt;assimp_root&gt;/lib/&lt;config-name&gt;/assimp.lib. config-name is one of the predefined project configs. For static linking, use release/debug. See the sections below on this page for more information on the other build configs. If done correctly you should now be able to compile, link, run and use the application. If the linker complains about some integral functions being defined twice you propably have mixed the runtimes. Recheck the project configuration (project properties -&gt; C++ -&gt; Code generation -&gt; Runtime) if you use static runtimes (Multithreaded / Multithreaded Debug) or dynamic runtimes (Multithreaded DLL / Multithreaded Debug DLL). Choose the ASSIMP linker lib accordingly. <br/>
<br/>
 Please don't forget to also read the <a class="el" href="install.html#assimp_stl">Microsoft Compilers and the C++ Standard Library</a> section on MSVC and the STL.</p>
<h1><a class="anchor" id="assimp_stl"></a>
Microsoft Compilers and the C++ Standard Library</h1>
<p>In VC8 and VC9 Microsoft introduced some Standard Library debugging features. A good example are improved iterator checks and various useful debug checks. The problem is the performance penalty that incurs with those extra checks.</p>
<p>Most of these security enhancements are active in release builds by default, rendering ASSIMP several times slower. However, it is possible to disable them by setting</p>
<div class="fragment"><div class="line">_HAS_ITERATOR_DEBUGGING=0</div>
<div class="line">_SECURE_SCL=0</div>
</div><!-- fragment --><p>in the preprocessor options (or alternatively in the source code, just before the STL is included for the first time). <b>ASSIMP's vc8 and vc9 configs enable these flags by default</b>.</p>
<p><em>If you're linking statically against ASSIMP:</em> Make sure your applications uses the same STl settings! If you do not, there are two binary incompatible STL versions mangled together and you'll crash. Alternatively you can disable the fast STL settings for ASSIMP by removing the 'FastSTL' property sheet from the vc project file.</p>
<p><em>If you're using ASSIMP in a DLL/SO:</em> It's ok. There's no STL used in the binary DLL/SO interface, so it doesn't care whether your application uses the same STL settings or not. <br/>
<br/>
 Another option is to build against a different STL implementation, for example STlport. There's a special <a class="el" href="install.html#assimp_stlport">Building against STLport</a> section that has a description how to achieve this.</p>
<h1><a class="anchor" id="install_own"></a>
Building the library from scratch</h1>
<p>To build the library on your own you first have to get hold of the dependencies. Fortunately, special attention was paid to keep the list of dependencies short. Unfortunately, the only dependency is <a href="http://www.boost.org">boost</a> which can be a bit painful to set up for certain development environments. Boost is a widely used collection of classes and functions for various purposes. Chances are that it was already installed along with your compiler. If not, you have to install it for yourself. Read the "Getting Started" section of the Boost documentation for how to setup boost. VisualStudio users can use a comfortable installer from <a href="http://www.boost-consulting.com/products/free">http://www.boost-consulting.com/products/free</a>. Choose the appropriate version of boost for your runtime of choice.</p>
<p><b>If you don't want to use boost</b>, you can build against our <em>"Boost-Workaround"</em>. It consists of very small implementations of the various boost utility classes used. However, you'll loose functionality (e.g. threading) by doing this. So, if you can use boost, you should use boost. Otherwise, See the <a class="el" href="">NoBoost-Section </a> later on this page for the details of the workaround.</p>
<p>Once boost is working, you have to set up a project for the ASSIMP library in your favorite IDE. If you use VC2005 or VC2008, you can simply load the solution or project files in the workspaces/ folder, otherwise you have to create a new package and add all the headers and source files from the include/ and code/ directories. Set the temporary output folder to obj/, for example, and redirect the output folder to bin/. Then build the library - it should compile and link fine.</p>
<p>The last step is to integrate the library into your project. This is basically the same task as described in the "Using the pre-built libraries" section above: add the include/ and bin/ directories to your IDE's paths so that the compiler can find the library files. Alternatively you can simply add the ASSIMP project to your project's overall solution and build it inside your solution.</p>
<h1><a class="anchor" id="use_noboost"></a>
Building without boost.</h1>
<p>The Boost-Workaround consists of dummy replacements for some boost utility templates. Currently there are replacements for</p>
<ul>
<li>boost.scoped_ptr</li>
<li>boost.scoped_array</li>
<li>boost.format</li>
<li>boost.random</li>
<li>boost.common_factor</li>
<li>boost.foreach</li>
<li>boost.tuple</li>
<li>boost.make_shared</li>
</ul>
<p>These implementations are very limited and are not intended for use outside ASSIMP. A compiler with full support for partial template specializations is required. To enable the workaround, put the following in your compiler's list of predefined macros: </p>
<div class="fragment"><div class="line"><span class="preprocessor">#define ASSIMP_BUILD_BOOST_WORKAROUND</span></div>
</div><!-- fragment --><p> <br/>
 If you're working with the provided solutions for Visual Studio use the <em>-noboost</em> build configs. <br/>
</p>
<p><b>ASSIMP_BUILD_BOOST_WORKAROUND</b> implies <b>ASSIMP_BUILD_SINGLETHREADED</b>. <br/>
 See the assimp_st section for more details.</p>
<h1><a class="anchor" id="assimp_dll"></a>
Windows DLL Build</h1>
<p>ASSIMP can be built as DLL. You just need to select a -dll config from the list of project configs and you're fine.</p>
<p><b>NOTE:</b> Theoretically, assimp-dll can be used with multithreaded (non-dll) runtime libraries, as long as you don't utilize any non-public stuff from the code folder. However, if you happen to encounter <em>very</em> strange problems, try changing the runtime to <em>Multithreaded (Debug) DLL</em>.</p>
<h1><a class="anchor" id="assimp_stlport"></a>
Building against STLport</h1>
<p>STLport is a free, fast and secure STL replacement that works with all major compilers and platforms. To get it, download the latest release from <a href="http://www.stlport.org">&lt;stlport.org&gt;</a>. Usually you'll just need to run 'configure' + a makefile (see their README for more details). Don't miss to add &lt;stlport_root&gt;/stlport to your compiler's default include paths - <b>prior</b> to the directory where your compiler vendor's headers lie. Do the same for &lt;stlport_root&gt;/lib and recompile ASSIMP. To ensure you're really building against STLport see <a class="el" href="ai_version_8h.html#ac914a32bb053cb6572032668562873f2" title="Returns assimp&#39;s compile flags.">aiGetCompileFlags()</a>. <br/>
 In our testing, STLport builds tend to be a bit faster than builds against Microsoft's C++ Standard Library. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>