---
** [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-Convenienc...) 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@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.