[PD] missing link

guenter geiger geiger at epy.co.at
Wed May 16 09:13:22 CEST 2001



Hi Iain,

with Windows, it isn't sufficient for a function to not be static in order
to be called from within a dxnamic library. You have to declare the
function as extern, (see all the EXTERN keywords in m_pd.h).

So you need something like
EXTERN sigsqrt_perfom(..) in m_pd.h and recompile pd, otherwise pd won't 
export the function to your external .. (I would rather copy paste
sigsqrt_perfomr into my external .. this way everyone could use it
without recompiling pd).

Guenter


On Tue, 15 May 2001, Iain Mott wrote:

> Hello all
> 
> I’m trying to compile some of my linux externals in windows – I’m having
> linking troubles with some of my code that uses “sigsqrt_perform” (a
> non-static function from d_math.c) – keep getting an ‘unresolved external’
> message
> 
> I’m trying to compile & link the externals in a single library and I’m using
> the following in my makefile:
> .c.dll:
>             cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
>             link /dll /export:$*_setup $*.obj $(PDNTLIB)
> 
> where PDNTLIB = $(PDNTLDIR)\libc.lib \
>             $(PDNTLDIR)\oldnames.lib \
>             $(PDNTLDIR)\kernel32.lib \
>             ..\pd032\bin\pd.lib
> 
> Have been using the ‘extern’ specifier in the main ‘setup’ function (the one
> that calls all the other *_setup’s for the individual objects) – but still
> no luck.
> 
> Any suggestions?
> 
> Cheers, iain
> ___________________________
> Iain Mott
> phone: +61 3 9639 2959
> email:   mott at reverberant.com
> http://www.reverberant.com
> 
> 




More information about the Pd-list mailing list