[erlang-questions] creating linked in drivers for Erlang on OSX using gcc

Tim Watson watson.timothy@REDACTED
Mon Mar 17 11:52:41 CET 2008


> 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
>

We'd tried with -bundle and -fno-common previously and it didn't work.
Finally, my co-conspiritor tried renaming the output files to .so
instead of .dylib and guess what!? It works.

Thanks for your help. I'd love to know why the file extension alone
causes a problem though.

Cheers,

Tim Watson



More information about the erlang-questions mailing list