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
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Pd-dev mailing list [email protected] https://lists.puredata.info/listinfo/pd-dev
