Hi list,
I'm trying to compile externals on Windows 10 using mingw32 toolchain. Pd version 0.47.1
I always get link errors related to Pd's global symbols being undefined, e.g.
undefined reference to `_imp__s_bang'
undefined reference to `_imp__s_list'
etc
My linker flags are:
gcc -shared -Wl,--enable-auto-import -o test.dll -L.../pd/bin -lpd
I get a similar issue linking externals built with Flext. Linkage seems to work fine except for these symbols.
Any ideas?
Hi, could be a problem with your linker flags. Try these:
gcc -static-libgcc -shared -Wl,--enable-auto-import "/c/pdbinpath/pd.dll" -o foo.dll foo.o
I basically took the linker flags from pdlibbuilder. I generally recommend this tool for building externals because it's cross platform and really convenient.
https://github.com/pure-data/pd-lib-builder/blob/master/Makefile.pdlibbuilde...
Christof
Gesendet: Donnerstag, 25. Mai 2017 um 11:48 Uhr Von: "Jamie Bullock" jamie@postlude.co.uk An: Pd-list@lists.iem.at Betreff: [PD] Linking externals on windows with mingw32
Hi list,
I'm trying to compile externals on Windows 10 using mingw32 toolchain. Pd version 0.47.1
I always get link errors related to Pd's global symbols being undefined, e.g.
undefined reference to _imp__s_bang' undefined reference to
_imp__s_list'
etc
My linker flags are:
gcc -shared -Wl,--enable-auto-import -o test.dll -L.../pd/bin -lpd
I get a similar issue linking externals built with Flext. Linkage seems to work fine except for these symbols.
Any ideas?
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
sorry, "/c/pdbinpath/pd.dll" is unix style (I use a msys2 shell). What I meant is: absolute path to pd.dll.
Gesendet: Donnerstag, 25. Mai 2017 um 13:13 Uhr Von: "Christof Ressi" christof.ressi@gmx.at An: "Jamie Bullock" jamie@postlude.co.uk, pd-list pd-list@iem.at Betreff: Re: [PD] Linking externals on windows with mingw32
Hi, could be a problem with your linker flags. Try these:
gcc -static-libgcc -shared -Wl,--enable-auto-import "/c/pdbinpath/pd.dll" -o foo.dll foo.o
I basically took the linker flags from pdlibbuilder. I generally recommend this tool for building externals because it's cross platform and really convenient.
https://github.com/pure-data/pd-lib-builder/blob/master/Makefile.pdlibbuilde...
Christof
Gesendet: Donnerstag, 25. Mai 2017 um 11:48 Uhr Von: "Jamie Bullock" jamie@postlude.co.uk An: Pd-list@lists.iem.at Betreff: [PD] Linking externals on windows with mingw32
Hi list, I'm trying to compile externals on Windows 10 using mingw32 toolchain. Pd version 0.47.1 I always get link errors related to Pd's global symbols being undefined, e.g. undefined reference to
_imp__s_bang' undefined reference to
_imp__s_list' etc My linker flags are: gcc -shared -Wl,--enable-auto-import -o test.dll -L.../pd/bin -lpd I get a similar issue linking externals built with Flext. Linkage seems to work fine except for these symbols. Any ideas? _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Awesome… this works! Thank you so much.
Jamie
On 25 May 2017, at 12:13, Christof Ressi christof.ressi@gmx.at wrote:
Hi, could be a problem with your linker flags. Try these:
gcc -static-libgcc -shared -Wl,--enable-auto-import "/c/pdbinpath/pd.dll" -o foo.dll foo.o
I basically took the linker flags from pdlibbuilder. I generally recommend this tool for building externals because it's cross platform and really convenient.
https://github.com/pure-data/pd-lib-builder/blob/master/Makefile.pdlibbuilde...
Christof
Gesendet: Donnerstag, 25. Mai 2017 um 11:48 Uhr Von: "Jamie Bullock" jamie@postlude.co.uk An: Pd-list@lists.iem.at Betreff: [PD] Linking externals on windows with mingw32
Hi list,
I'm trying to compile externals on Windows 10 using mingw32 toolchain. Pd version 0.47.1
I always get link errors related to Pd's global symbols being undefined, e.g.
undefined reference to `_imp__s_bang' undefined reference to `_imp__s_list'
etc
My linker flags are:
gcc -shared -Wl,--enable-auto-import -o test.dll -L.../pd/bin -lpd
I get a similar issue linking externals built with Flext. Linkage seems to work fine except for these symbols.
Any ideas? _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Hi Jamie, if you like to contribute a pull request to the flext build system, it would be appreciated! best, Thomas
-- Thomas Grill http://grrrr.org
Am 25.05.2017 um 15:09 schrieb Jamie Bullock jamie.b.bullock@gmail.com:
Awesome… this works! Thank you so much.
Jamie
On 25 May 2017, at 12:13, Christof Ressi christof.ressi@gmx.at wrote:
Hi, could be a problem with your linker flags. Try these:
gcc -static-libgcc -shared -Wl,--enable-auto-import "/c/pdbinpath/pd.dll" -o foo.dll foo.o
I basically took the linker flags from pdlibbuilder. I generally recommend this tool for building externals because it's cross platform and really convenient.
https://github.com/pure-data/pd-lib-builder/blob/master/Makefile.pdlibbuilde...
Christof
Gesendet: Donnerstag, 25. Mai 2017 um 11:48 Uhr Von: "Jamie Bullock" jamie@postlude.co.uk An: Pd-list@lists.iem.at Betreff: [PD] Linking externals on windows with mingw32
Hi list,
I'm trying to compile externals on Windows 10 using mingw32 toolchain. Pd version 0.47.1
I always get link errors related to Pd's global symbols being undefined, e.g.
undefined reference to
_imp__s_bang' undefined reference to
_imp__s_list'etc
My linker flags are:
gcc -shared -Wl,--enable-auto-import -o test.dll -L.../pd/bin -lpd
I get a similar issue linking externals built with Flext. Linkage seems to work fine except for these symbols.
Any ideas? _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 05/25/2017 11:48 AM, Jamie Bullock wrote:
undefined reference to `_imp__s_bang' undefined reference to `_imp__s_list'
according to one of the recent announcements of miller, the
"s_bang"-class of symbols (which is what your undefined references are
about), will go away in the near future.
you probably should update your code to use gensym("bang")
rather than
s_bang
(and probably do local caching of the variable).
dmasr IOhannes
On 25 May 2017, at 14:24, zmoelnig@iem.at wrote:
On 05/25/2017 11:48 AM, Jamie Bullock wrote:
undefined reference to
_imp__s_bang' undefined reference to
_imp__s_list'according to one of the recent announcements of miller, the "s_bang"-class of symbols (which is what your undefined references are about), will go away in the near future.
Good :)
you probably should update your code to use
gensym("bang")
rather thans_bang
(and probably do local caching of the variable).
Thanks for the heads up.
but why? and wouldn't this break LOTS of existing code?
Gesendet: Donnerstag, 25. Mai 2017 um 15:24 Uhr Von: zmoelnig@iem.at An: pd-list@lists.iem.at Betreff: Re: [PD] Linking externals on windows with mingw32
On 05/25/2017 11:48 AM, Jamie Bullock wrote:
undefined reference to `_imp__s_bang' undefined reference to `_imp__s_list'
according to one of the recent announcements of miller, the "s_bang"-class of symbols (which is what your undefined references are about), will go away in the near future. you probably should update your code to use
gensym("bang")
rather thans_bang
(and probably do local caching of the variable).dmasr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
I'll keep s_bang, etc, alive in Pd vanilla, but if you want your extern to run in threadable versions of libpd in the future you should not use it. So nobody's patch will break as far as I know - this just limits ones ability to use old externs in, say, VST plug-ins powered by libpd.
cheers Miller
On Thu, May 25, 2017 at 04:30:48PM +0200, Christof Ressi wrote:
but why? and wouldn't this break LOTS of existing code?
Gesendet: Donnerstag, 25. Mai 2017 um 15:24 Uhr Von: zmoelnig@iem.at An: pd-list@lists.iem.at Betreff: Re: [PD] Linking externals on windows with mingw32
On 05/25/2017 11:48 AM, Jamie Bullock wrote:
undefined reference to `_imp__s_bang' undefined reference to `_imp__s_list'
according to one of the recent announcements of miller, the "s_bang"-class of symbols (which is what your undefined references are about), will go away in the near future. you probably should update your code to use
gensym("bang")
rather thans_bang
(and probably do local caching of the variable).dmasr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Thanks for clarifying!
Christof
Gesendet: Donnerstag, 25. Mai 2017 um 16:38 Uhr Von: "Miller Puckette" msp@ucsd.edu An: "Christof Ressi" christof.ressi@gmx.at Cc: pd-list pd-list@iem.at Betreff: Re: [PD] Linking externals on windows with mingw32
I'll keep s_bang, etc, alive in Pd vanilla, but if you want your extern to run in threadable versions of libpd in the future you should not use it. So nobody's patch will break as far as I know - this just limits ones ability to use old externs in, say, VST plug-ins powered by libpd.
cheers Miller
On Thu, May 25, 2017 at 04:30:48PM +0200, Christof Ressi wrote:
but why? and wouldn't this break LOTS of existing code?
Gesendet: Donnerstag, 25. Mai 2017 um 15:24 Uhr Von: zmoelnig@iem.at An: pd-list@lists.iem.at Betreff: Re: [PD] Linking externals on windows with mingw32
On 05/25/2017 11:48 AM, Jamie Bullock wrote:
undefined reference to `_imp__s_bang' undefined reference to `_imp__s_list'
according to one of the recent announcements of miller, the "s_bang"-class of symbols (which is what your undefined references are about), will go away in the near future. you probably should update your code to use
gensym("bang")
rather thans_bang
(and probably do local caching of the variable).dmasr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list