[erlang-questions] creating linked in drivers for Erlang on OSX using gcc
Lev Walkin
vlm@REDACTED
Sun Mar 16 03:53:05 CET 2008
Tim Watson wrote:
> Hi all,
>
> I'm writing a linked in driver for Erlang/OTP12B. I've got it all
> working on Windows but having problems getting things to work on Mac
> OS. On the dev machine in question (a Mac Air), I can compile my code
> but can't link it with erts properly. When linking, the erl_driver API
> isn't being linked properly:
My cross-platform Makefile does that:
.c.o:
$(CC) $(CFLAGS) -fPIC -o $@ -c $<
.o.so:
$(CC) -bundle -flat_namespace -undefined suppress -o $@ $< \
|| $(CC) -shared -o $@ $<
Specifically, note the
-bundle -flat_namespace -undefined suppress
also, CFLAGS has -fno-common
Works perfectly on Mac OS X with R12B1
--
vlm
More information about the erlang-questions
mailing list