﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AJehuty%2FGSoC_2013%2FDiscussions%2FCompiling_OpenVDB</id>
	<title>利用者:Jehuty/GSoC 2013/Discussions/Compiling OpenVDB - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AJehuty%2FGSoC_2013%2FDiscussions%2FCompiling_OpenVDB"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jehuty/GSoC_2013/Discussions/Compiling_OpenVDB&amp;action=history"/>
	<updated>2026-11-27T06:04:50Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jehuty/GSoC_2013/Discussions/Compiling_OpenVDB&amp;diff=142899&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jehuty/GSoC_2013/Discussions/Compiling_OpenVDB&amp;diff=142899&amp;oldid=prev"/>
		<updated>2018-06-28T20:56:52Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 20:56時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jehuty/GSoC_2013/Discussions/Compiling_OpenVDB&amp;diff=142898&amp;oldid=prev</id>
		<title>wiki&gt;Jehuty: /* Compiling OpenVDB */</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jehuty/GSoC_2013/Discussions/Compiling_OpenVDB&amp;diff=142898&amp;oldid=prev"/>
		<updated>2013-06-29T13:26:25Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Compiling OpenVDB&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Compiling OpenVDB ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These were the steps taken to add the OpenVDB library to the Blender solution in the Cycles Volume branch.&lt;br /&gt;
&lt;br /&gt;
I used MSVS 2008 on Windows 7 and built for 32-bit.&lt;br /&gt;
&lt;br /&gt;
Branch: soc-2013-cycles_volume (https://svn.blender.org/svnroot/bf-blender/branches/soc-2013-cycles_volume)&lt;br /&gt;
&lt;br /&gt;
I used the OpenVDB library version 1.1.1 (http://www.openvdb.org/download/ - latest version only), but also available from their github repository (https://github.com/dreamworksanimation/openvdb_dev).&lt;br /&gt;
&lt;br /&gt;
As per its makefile, only the needed files were added to extern/openvdb, which meant excluding the folders cmd, doc and unittest.&lt;br /&gt;
&lt;br /&gt;
The needed dependencies are:&lt;br /&gt;
&lt;br /&gt;
 * Boost (www.boost.org), version 1.42.0 or later&lt;br /&gt;
&lt;br /&gt;
 * libz (zlib.net)&lt;br /&gt;
&lt;br /&gt;
 * OpenEXR (www.openexr.com), for the 16-bit float Half class in half.h&lt;br /&gt;
&lt;br /&gt;
 * Intel Threading Building Blocks (threadingbuildingblocks.org),&lt;br /&gt;
  version 3.0 or later&lt;br /&gt;
&lt;br /&gt;
Blender has the first three available in trunk/lib/ (for MSVS2008 on Windows, 32-bit: https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows).&lt;br /&gt;
&lt;br /&gt;
I downloaded tbb41_20130613oss_win.zip from Intel&amp;#039;s tbb website, and extracted the folders include and lib\ia32\vc9 to lib\windows\tbb\include and lib\windows\tbb\lib, respectively. This helped keep the libs directory organized, even though tbb hasn&amp;#039;t been added to svn at this time.&lt;br /&gt;
&lt;br /&gt;
With everything in place, hit Build, and voilá, nothing works. Quite the contrary. &lt;br /&gt;
I kept getting this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
1&amp;gt;------ Build started: Project: extern_openvdb, Configuration: Debug Win32 ------&lt;br /&gt;
1&amp;gt;Compiling...&lt;br /&gt;
1&amp;gt;Archive.cc&lt;br /&gt;
1&amp;gt;r:\blender\blendersvn\lib\windows\boost\include\boost\numeric\conversion\detail\int_float_mixture.hpp(38) : error C2065: &amp;#039;numeric_limits&amp;#039; : undeclared identifier&lt;br /&gt;
1&amp;gt;        r:\blender\blendersvn\lib\windows\boost\include\boost\numeric\conversion\detail\int_float_mixture.hpp(44) : see reference to class template instantiation &amp;#039;boost::numeric::convdetail::get_int_float_mixture&amp;lt;T,S&amp;gt;&amp;#039; being compiled&lt;br /&gt;
1&amp;gt;r:\blender\blendersvn\lib\windows\boost\include\boost\numeric\conversion\detail\int_float_mixture.hpp(38) : error C2975: &amp;#039;C_&amp;#039; : invalid template argument for &amp;#039;boost::mpl::bool_&amp;#039;, expected compile-time constant expression&lt;br /&gt;
1&amp;gt;        r:\blender\blendersvn\lib\windows\boost\include\boost\mpl\bool.hpp(23) : see declaration of &amp;#039;C_&amp;#039;&lt;br /&gt;
1&amp;gt;r:\blender\blendersvn\lib\windows\boost\include\boost\numeric\conversion\detail\int_float_mixture.hpp(38) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int&lt;br /&gt;
1&amp;gt;r:\blender\blendersvn\lib\windows\boost\include\boost\numeric\conversion\detail\int_float_mixture.hpp(38) : error C2143: syntax error : missing &amp;#039;;&amp;#039; before &amp;#039;&amp;gt;&amp;#039;&lt;br /&gt;
1&amp;gt;r:\blender\blendersvn\lib\windows\boost\include\boost\numeric\conversion\detail\int_float_mixture.hpp(38) : error C2238: unexpected token(s) preceding &amp;#039;;&amp;#039;&lt;br /&gt;
1&amp;gt;r:\blender\blendersvn\lib\windows\boost\include\boost\numeric\conversion\detail\int_float_mixture.hpp(39) : error C2065: &amp;#039;numeric_limits&amp;#039; : undeclared identifier&lt;br /&gt;
1&amp;gt;r:\blender\blendersvn\lib\windows\boost\include\boost\numeric\conversion\detail\int_float_mixture.hpp(39) : error C2975: &amp;#039;C_&amp;#039; : invalid template argument for &amp;#039;boost::mpl::bool_&amp;#039;, expected compile-time constant expression&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and it went on and on with similar errors for each file. At first, I thought boost header files weren&amp;#039;t being included correctly, since I was using CMake to setup the project.&lt;br /&gt;
&lt;br /&gt;
So I added a project manually to the CMake-generated Blender solution file, configured the correct directories in Additional Include Directories in this new project&amp;#039;s settings, and tried compiling it - same errors, meaning CMake was not to blame.&lt;br /&gt;
&lt;br /&gt;
After going through numerous trial and error attempts, I found a post by Joe Kider on OpenVDB&amp;#039;s forum that led me to the solution.&lt;br /&gt;
&lt;br /&gt;
First, there is this precious bit of advice from http://www.winimage.com/zLibDll/index.html :&lt;br /&gt;
&lt;br /&gt;
 {{NiceTip|zlib|Make sure to define _WINDOWS and ZLIB_DLL before including zlib.h.}}&lt;br /&gt;
&lt;br /&gt;
This led to adding &amp;lt;code&amp;gt; #define ZLIB_WINAPI &amp;lt;/code&amp;gt; to the file extern\openvdb\internal\openvdb\io\Compression.cc;&lt;br /&gt;
&lt;br /&gt;
Secondly, from this article on Microsoft Support: http://support.microsoft.com/kb/143208, we have&lt;br /&gt;
 &lt;br /&gt;
{{NiceTip|std::min &amp;amp; std::max| Simply define the NOMINMAX preprocessor symbol. This can be done in the Developer Studio project under Build, Settings, on the C/C++ tab, in the Preprocessor category. This will suppress the min and max definitions in Windef.h.}}&lt;br /&gt;
&lt;br /&gt;
Then I added &amp;lt;code&amp;gt; #define NOMINMAX &amp;lt;/code&amp;gt; to the file extern\openvdb\internal\openvdb\math\Coord.h;&lt;br /&gt;
&lt;br /&gt;
After both changes, the library compiled regardless of how it was added, manually or setup by CMake.&lt;br /&gt;
&lt;br /&gt;
Since both workarounds are platform-specific, I&amp;#039;ll add platform guards around these.&lt;/div&gt;</summary>
		<author><name>wiki&gt;Jehuty</name></author>
		
	</entry>
</feed>