Boost C++ Libraries: Ticket #10405: Problem building cpp_dec_float multiprecision example https://svn.boost.org/trac10/ticket/10405 <p> Dear developer, </p> <p> I would like to build the small example shown at: </p> <p> <a href="http://www.boost.org/doc/libs/1_56_0/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html">http://www.boost.org/doc/libs/1_56_0/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html</a> </p> <p> But it fails to compile with MSVC 2008 on Windows 7: </p> <p> 1&gt;Linking... 1&gt;bmt.obj : error LNK2019: unresolved external symbol "class boost::multiprecision::number&lt;class boost::multiprecision::backends::cpp_dec_float&lt;100,int,void&gt;,1&gt; <span class="underline">cdecl boost::math::tgamma&lt;struct boost::multiprecision::detail::expression&lt;struct boost::multiprecision::detail::multiply_immediates,class boost::multiprecision::number&lt;class boost::multiprecision::backends::cpp_dec_float&lt;100,int,void&gt;,1&gt;,class boost::multiprecision::number&lt;class boost::multiprecision::backends::cpp_dec_float&lt;100,int,void&gt;,1&gt;,void,void&gt; &gt;(struct boost::multiprecision::detail::expression&lt;struct boost::multiprecision::detail::multiply_immediates,class boost::multiprecision::number&lt;class boost::multiprecision::backends::cpp_dec_float&lt;100,int,void&gt;,1&gt;,class boost::multiprecision::number&lt;class boost::multiprecision::backends::cpp_dec_float&lt;100,int,void&gt;,1&gt;,void,void&gt;)" (??$tgamma@U?$expression@Umultiply_immediates@detail@multiprecision@boost@@V?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@34@V534@XX@detail@multiprecision@boost@@@math@boost@@YA?AV?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@multiprecision@1@U?$expression@Umultiply_immediates@detail@multiprecision@boost@@V?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@34@V534@XX@detail@31@@Z) referenced in function _main 1&gt;bmt.obj : error LNK2019: unresolved external symbol "class boost::multiprecision::number&lt;class boost::multiprecision::backends::cpp_dec_float&lt;100,int,void&gt;,1&gt; </span>cdecl boost::math::tgamma&lt;class boost::multiprecision::number&lt;class boost::multiprecision::backends::cpp_dec_float&lt;100,int,void&gt;,1&gt; &gt;(class boost::multiprecision::number&lt;class boost::multiprecision::backends::cpp_dec_float&lt;100,int,void&gt;,1&gt;)" (??$tgamma@V?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@multiprecision@boost@@@math@boost@@YA?AV?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@multiprecision@1@V231@@Z) referenced in function _main 1&gt;D:\Damien\Programmation\boost-multiprecision-test\Debug\boost-multiprecision-test.exe : fatal error LNK1120: 2 unresolved externals </p> <p> And I don't understand why since it should be a header-only lib. Any help would be highly appreciated. Best regards, </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10405 Trac 1.4.3 John Maddock Tue, 26 Aug 2014 16:55:31 GMT <link>https://svn.boost.org/trac10/ticket/10405#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10405#comment:1</guid> <description> <p> Ah, there's an error in the example: a missing #include, you need to add </p> <pre class="wiki">#include &lt;boost/math/special_functions/gamma.hpp&gt; </pre><p> To the top of the example, I'll fix the docs shortly. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 29 Aug 2014 17:55:56 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10405#comment:2 https://svn.boost.org/trac10/ticket/10405#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/cd1e62a4b0a42abf89eab2b2d1a1ecf3607b8c7e"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/cd1e62a4b0a42abf89eab2b2d1a1ecf3607b8c7e</a> </p> Ticket