[PD-dev] pd external c++ example

Joseph Larralde joseph.larralde at gmail.com
Mon Jun 4 15:41:21 CEST 2018


That's awesome.
Thank you both for shedding the light on the role of the setup function.
I should definitely read pd's source someday to get a deeper understanding.

And I want to say bravo for the actual state of the github organization 
by the way.

Best,
Joseph

Le 04/06/18 à 15:21, IOhannes m zmoelnig a écrit :
> On 2018-06-04 13:05, Joseph Larralde wrote:
>> And as you said, it compiles with extern "C" surrounding only the setup
>> function.
>> In fact it even compiles without any extern "C" at all (but won't load,
>> probably due to name mangling).
> yes.
> you only need the 'extern "C" {}' clause to prevent name-mangling.
> the (unmangled) name is only important for Pd to find the setup function
> (the setup-function must be a well-known name that can be calculated
> from the library name).
>
> so in order for Pd to bootstrap your library, you must make sure to
> prohibit name-mangling by protecting the entry-points with 'extern "C"'.
> as Pd doesn't need to resolve the name of the rest, you don't have to
> protect it.
>
>
> fgasdrm
> IOhannes
>
>
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180604/30cf7849/attachment.html>


More information about the Pd-dev mailing list