[PD-dev] Re: [PD] Using CC (C++) to compile externals

Frank Barknecht barknech at ph-cip.uni-koeln.de
Thu Jun 6 18:20:51 CEST 2002


Hi,
I cc'd this to pd-dev <pd-dev at iem.kug.ac.at> because that's the new
list for this kind of questions.

Schram, M.J. hat gesagt: // Schram, M.J. wrote:

> I want to make a pd-external which makes use of a library which
> needs C++.  I'm a newbie in writing PD externals. I'm using a SGI
> IRIX 6 system.
> 
> I use the standard makefile which comes with the pd Foo examples. .
>
> When I change the "cc" in the makefile to "CC" my c++ lib compiles but
> m_pd.h generates the following error 12 times: " A storage class cannot be
> specified at this
> point" EXTERN_STRUCT _clock;
> 
> Anyone have any ideas about this?

No, not exactly, but I had to solve similar problems when I ported the
dx7 emulator rx-saturno to a PD external (see footils.org). rx-saturno
is written in C++, so maybe I have some tips. First I read the
Usenet-FAQ on "Howto Mix C and C++" somewhere, that's of help, search
google for it.

Basically what's needed is: You should use the same compiler for all
sources involved.

You should define the external's setup function as:
extern "C" void something_setup(void)

After I discovered flext at http://www.parasitaere-kapazitaeten.net/Pd/ext
I wrote most of my externaly directly in C++.

ciao,
-- 
 Frank Barknecht                               _ ______footils.org__




More information about the Pd-dev mailing list