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 for further information.
the attached bug does just this:
- remove the original build kludge
- add the new one (dummy.cxx)
Anonymous
applied to 0.46 branch and head
smart!