[PD] Help with writing externals
Mathieu Bouchard
matju at sympatico.ca
Fri Apr 2 23:27:47 CEST 2004
On Fri, 2 Apr 2004, thewade wrote:
> gcc -Wl,-export-dynamic -lasound -lrt -ljack -I/usr/local/include -o
> ../general/fft-bin~.pd_linux fft-bin~.c
> /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.text+0x18):
> In function `_start\': : undefined reference to `main\'
> /tmp/ccAyKAvm.o(.text+0xf): In function `fftbin_tilde_new\': :
> undefined reference to `gensym\'
> Also, how would I put both of these into one .pd_linux external
> through linking? Just provide two .c files to be compiled instead of
> one?
To build a linux DLL file such as .so's or .pd_linux's, you need to use
the -shared option. Otherwise it assumes you want to compile an
application, and therefore it looks for main() AND for all functions of
PureData that you use in your external.
To build a macosx DLL it's different, it's more like "-bundle -undefined
suppress -flat_namespace", because OSX is so much more intuitive.
To build a win32 DLL i don't know.
In any case, "-c" is not relevant here, as it is use to produce an
intermediate result file, those that normally have a .o suffix (or .OBJ in
windows).
________________________________________________________________
Mathieu Bouchard http://artengine.ca/matju
More information about the Pd-list
mailing list