On Wed, Dec 27, 2017 at 7:52 PM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 12/27/2017 07:05 PM, Christof Ressi wrote:
this strikes me as odd. in C, funtion declarations/definitions are extern by default, i.e. there shouldn't be any difference between void foo(void) { ... } and extern void foo(void) {...}
in fact, I haven't seen a single Pd external source file where the setup function was explicitly marked 'extern'.
could it be that your setup function was accidentally marked as 'static'? how did you build your external?
more likely, your compiler/linker defaults to not exporting any symbols that are not explicitely eported. reading the changelog and README.Debian that comes with your compiler docs (look out for /usr/share/doc/gcc*/) might help.
When a makefile or environment specifies ld flag -visibility=hidden, gcc does not export symbols except those declared with "__attribute__((visibility("default")))" (on Linux / OSX) or "__declspec(dllexport)" (on Windows). (https://gcc.gnu.org/wiki/Visibility, this doc is about C++ but it works the same for C). Such attributes should be used for the setup function of a Pd external in that case. I haven't found any docs saying that explicit "extern" can serve a similar purpose of overriding a visibility setting or default.
Katja
gfamdsr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list