[PD-dev] Error when crosscompiling pdlua

Martin Peach martin.peach at sympatico.ca
Mon Dec 10 19:37:38 CET 2007


Frank Barknecht wrote:

>some more info: Could this be related to Claude's findings mentioned
>in the lua.c file:
>
>/** Pd loader registration, defined in pd/src/s_loader.c but not exported. 
>*/
>  void sys_register_loader(loader_t loader);
>
>  /** Pd extern dir declaration (for help finding), defined in 
>pd/src/m_class.c but not exported. */
>   void class_set_extern_dir(t_symbol *s);
>
>If sys_register_loader is "not exported", how are loaders meant to be
>built? And why does gcc not complain on native Linux using practically
>the same command line?
>

With dlls you have to export symbols using a def file or /export: statement 
on the command line (or __declspec(dllexport) in the code with MSVC). On 
linux all symbols in a shared library are visible by default, it's about the 
structure of a windows dll versus that of a unix shared library, not gcc.
Martin


>
>Frank Barknecht hat gesagt: // Frank Barknecht wrote:
>
> > I fail to cross-compile pdlua on Debian for W32. This is my error:
> >
> > $ i586-mingw32msvc-gcc -I/lua-5.1.2/src/ -I./ -I/usr/include/ -shared 
>lua5.1.dll pd.dll -o lua.dll lua.c
> > /tmp/ccobudhL.o:lua.c:(.text+0x1bc4): undefined reference to 
>`_class_set_extern_dir'
> > /tmp/ccobudhL.o:lua.c:(.text+0x1c65): undefined reference to 
>`_class_set_extern_dir'
> > /tmp/ccobudhL.o:lua.c:(.text+0x1c92): undefined reference to 
>`_class_set_extern_dir'
> > /tmp/ccobudhL.o:lua.c:(.text+0x1e09): undefined reference to 
>`_sys_register_loader'
> > Info: resolving _s_ by linking to __imp__s_ (auto-import)
> > collect2: ld returned 1 exit status
> >
> > This is with the precompiled lua5.1.dll from
> > http://luabinaries.luaforge.net/download.html and the precompiled
> > pd.dll from Miller's site, both 0.41 and 0.40 give the same error.
> >
> > I could remove the "_class_set_extern_dir" stuff from lua.c, but I'm
> > quite sure that "_sys_register_loader" is important.
> >
> > Any ideas how to fix this?






More information about the Pd-dev mailing list