Menu

#552 autotools: ASIO requires C++ linker

bugfix
pending-accepted
5
2015-06-24
2015-06-22
Anonymous
No

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)

1 Attachments

Discussion

  • Miller Puckette

    Miller Puckette - 2015-06-23

    applied to 0.46 branch and head

     
  • Miller Puckette

    Miller Puckette - 2015-06-23
    • status: open --> pending-accepted
     
  • Johan Boulé

    Johan Boulé - 2015-06-24

    smart!

     

Anonymous
Anonymous

Add attachments
Cancel