<div class="markdown_content"><hr />
<p><strong> <a class="alink" href="http://sourceforge.net/p/pure-data/patches/552">[patches:#552]</a> autotools: ASIO requires C++ linker</strong></p>
<p><strong>Status:</strong> open<br />
<strong>Group:</strong> bugfix<br />
<strong>Labels:</strong> mingw asio build-system <br />
<strong>Created:</strong> Mon Jun 22, 2015 09:42 PM UTC by Anonymous<br />
<strong>Last Updated:</strong> Mon Jun 22, 2015 09:42 PM UTC<br />
<strong>Owner:</strong> Miller Puckette</p>
<p>ASIO is a C++-library, therefore it requires Pd to be linked with a C++-linker.</p>
<p>the current attempt (when building Pd on mingw using the autotools build system), is an ugly kludge that simply sets the C-compiler (<code>CC</code>) to <code>g++</code>.<br />
This forces all of Pd's C-code to be compiled with a C++-compiler, which fails (because C is less restrictive than C++ and uses different keywords).</p>
<p>A better solution is to tell autotools that Pd has an additional (dummy) source-file that is a C++-file (just add <code>dummy.cpp</code> to <code>pd_SOURCES</code>).<br />
automake will then automatically use the correct compiler for the sources (that is a C-compiler for C-sources) but will use a C++-compiler for linking.</p>
<p>see the <a class="" href="http://www.gnu.org/software/autoconf/manual/automake.html#Libtool-Convenience-Libraries" rel="nofollow">automake documentation</a> for further information.</p>
<p>the attached bug does just this:<br />
- remove the original build kludge<br />
- add the new one (dummy.cxx)</p>
<hr />
<p>Sent from sourceforge.net because pd-dev@lists.iem.at is subscribed to <a href="http://sourceforge.net/p/pure-data/patches">http://sourceforge.net/p/pure-data/patches/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="http://sourceforge.net/p/pure-data/admin/patches/options.">http://sourceforge.net/p/pure-data/admin/patches/options.</a>  Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>