[PD-dev] [pure-data:patches] #552 autotools: ASIO requires C++ linker

Ticket 552 552 at patches.pure-data.p.re.sf.net
Mon Jun 22 23:42:27 CEST 2015




---

** [patches:#552] autotools: ASIO requires C++ linker**

**Status:** open
**Group:** bugfix
**Labels:** mingw asio build-system 
**Created:** Mon Jun 22, 2015 09:42 PM UTC by Anonymous
**Last Updated:** Mon Jun 22, 2015 09:42 PM UTC
**Owner:** Miller Puckette

ASIO is a C++-library, therefore it requires Pd to be linked with a C++-linker.

the current attempt (when building Pd on mingw using the autotools build system), is an ugly kludge that simply sets the C-compiler (`CC`) to `g++`.
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).

A better solution is to tell autotools that Pd has an additional (dummy) source-file that is a C++-file (just add `dummy.cpp` to `pd_SOURCES`).
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.


see the [automake documentation](http://www.gnu.org/software/autoconf/manual/automake.html#Libtool-Convenience-Libraries) for further information.


the attached bug does just this:
- remove the original build kludge
- add the new one (dummy.cxx)


---

Sent from sourceforge.net because pd-dev at lists.iem.at is subscribed to http://sourceforge.net/p/pure-data/patches/

To unsubscribe from further messages, a project admin can change settings at http://sourceforge.net/p/pure-data/admin/patches/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20150622/33d2ed8b/attachment.html>


More information about the Pd-dev mailing list