On Tue, 12 Jul 2011 09:22 +0200, "IOhannes m zmoelnig" zmoelnig@iem.at wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2011-07-11 19:37, Hans-Christoph Steiner wrote:
That makes me think.... so ./configure is finding libdl find, and then setting HAVE_LIBDL, and then the code in s_loader.c is going to do both HAVE_LIBDL and the MSW section below it. So I guess we should force this build system to not use HAVE_LIBDL on Windows, or fix the define to be something like:
shouldn't it be more like trying all available dylib loading mechanisms? e.g. if HAVE_LIBDL than try using dlopen, if that fails fall back to the w32 native LoadLibrary.
and finally, Pd should probably still be able to compile even if no dylib mechanism is present (think iOS). if the system cannot loading libraries, than Pd won't be able to load externals, but internals and abstractions will continue to work.
Yes, defiitely. Here's how I am thinking (also attached):
--- a/src/s_loader.c +++ b/src/s_loader.c @@ -178,8 +178,7 @@ gotone: } makeout = (t_xxx)dlsym(dlobj, symname); /* fprintf(stderr, "symbol %s\n", symname); */ -#endif -#ifdef MSW +#elif defined(_WIN32) sys_bashfilename(filename, filename); ntdll = LoadLibrary(filename); if (!ntdll) @@ -189,6 +188,8 @@ gotone: return (0); } makeout = (t_xxx)GetProcAddress(ntdll, symname); +#else +# warning "No dynamic loading mechanism specified, libdl or WIN32 required for loading externa #endif
if (!makeout)