The errors are probably because you are not linking against pd.lib, which is where the undefined symbols are hiding. Martin
De: Miguel Cardoso mcardoso@soopa.org Date: 2006/12/12 mar. PM 03:36:28 GMT-05:00 À: pd-liste pd-list@iem.at Objet: [PD] error compiling any2string
I get this error compiling any2string.c
does anyone have these moocow externals compiled for mac intel?
thks list
cc any2string.c -o any2string /usr/bin/ld: Undefined symbols: _main _binbuf_add _binbuf_clear _binbuf_free _binbuf_gettext _binbuf_new _class_addanything _class_new _class_sethelpsymbol _freebytes _gensym _getbytes _outlet_free _outlet_list _outlet_new _pd_new _s_ _s_float _s_list collect2: ld returned 1 exit status make: *** [any2string] Error 1
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
do you know where I can find the pd lib?
thanks for all Martin
On Dec 12, 2006, at 8:51 PM, martin.peach@sympatico.ca wrote:
The errors are probably because you are not linking against pd.lib,
which is where the undefined symbols are hiding. MartinDe: Miguel Cardoso mcardoso@soopa.org Date: 2006/12/12 mar. PM 03:36:28 GMT-05:00 À: pd-liste pd-list@iem.at Objet: [PD] error compiling any2string
I get this error compiling any2string.c
does anyone have these moocow externals compiled for mac intel?
thks list
cc any2string.c -o any2string /usr/bin/ld: Undefined symbols: _main _binbuf_add _binbuf_clear _binbuf_free _binbuf_gettext _binbuf_new _class_addanything _class_new _class_sethelpsymbol _freebytes _gensym _getbytes _outlet_free _outlet_list _outlet_new _pd_new _s_ _s_float _s_list collect2: ld returned 1 exit status make: *** [any2string] Error 1
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Miguel Cardoso wrote:
do you know where I can find the pd lib?
thanks for all Martin
On Dec 12, 2006, at 8:51 PM, martin.peach@sympatico.ca wrote:
The errors are probably because you are not linking against pd.lib, which is where the undefined symbols are hiding. Martin
De: Miguel Cardoso mcardoso@soopa.org Date: 2006/12/12 mar. PM 03:36:28 GMT-05:00 Ã: pd-liste pd-list@iem.at Objet: [PD] error compiling any2string
I get this error compiling any2string.c
does anyone have these moocow externals compiled for mac intel?
thks list
cc any2string.c -o any2string /usr/bin/ld: Undefined symbols: _main
But looking for main implies that you are compiling a program. A pd external is a dynamic library. It seems to me you are on some kind of mac, which I don't know about, but I'll try anyway. Stealing a line or two from a typical pd makefile:
CFLAGS = -DPD $(OPT_CFLAGS) -I$(pd_src)/src -W $(DEBUG_CFLAGS) LDFLAGS = LIBS = -lm ifeq ($(OS_NAME),darwin) CFLAGS += -I/sw/include -DMACOSX -DUNIX -Dunix LDFLAGS += -bundle -bundle_loader $(pd_src)/bin/pd -L/sw/lib LIBS += -lc DYLIB_LDFLAGS = -dynamiclib -read_only_relocs warning -L/sw/lib DYLIB_EXTENSION = dylib STRIP = strip -x and ### C files %.o: %.c $(CC) $(CFLAGS) -o "$*.o" -c "$*.c"
%.$(EXTENSION): %.o
$(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
test -f $*.libs && cat $*.libs
test -f $(dir $*)../$(BUILDSRC_OS_NAME)/$(notdir $*).libs && \ cat $(dir $*)../$(BUILDSRC_OS_NAME)/$(notdir $*).libs
chmod a-x "$*.$(EXTENSION)"
$(STRIP) $*.$(EXTENSION)
rm -f -- $*.o
This implies that instead of: cc any2string.c -o any2string you should write: cc any2string.c -DPD -I/sw/include -I$(pd_src)/src -DMACOSX -DUNIX -Dunix -o any2string.o to compile it, and if that works, cc -bundle -bundle_loader $(pd_src)/bin/pd -L/sw/lib -o anystring.pd_darwin any2string.o -lm -lc which will link it...except that $(pd_src) should be the path to your pd source. Then: chmod a-x any2string.pd_darwin since it's not an executable file, and: strip -x any2string.pd_darwin to remove unused code from the binary. But I don't really know, not having tried it ;(.
Martin