Hi all,

has anyone compiled the LADSPA sdk for Mac OS X? I expect lots of
people have, and that it's very easy..!

In the src directory, I type make and get this: 

ld: unknown flag: -shared

The targets in the makefile are:

../plugins/%.so:        plugins/%.c ladspa.h
        $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
        $(LD) -o ../plugins/$*.so plugins/$*.o -shared

../plugins/%.so:        plugins/%.cpp ladspa.h
        $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
        $(CPP) -o ../plugins/$*.so plugins/$*.o -shared

So I guess ld is different on OS X, and looking at the ld man page, I
guess maybe I need -dylib instead:

../plugins/%.so:        plugins/%.c ladspa.h
        $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
        $(LD) -o ../plugins/$*.so plugins/$*.o -dylib

../plugins/%.so:        plugins/%.cpp ladspa.h
        $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
        $(CPP) -o ../plugins/$*.so plugins/$*.o -dylib

But now I get this error: 

ld: plugins/amp.o illegal undefined reference for multi module
MH_DYLIB output file to symbol: dyld_stub_binding_helper from section
(__DATA,__la_symbol_ptr) relocation entry: 0

and that's where I give up! But I guess there's a solution which is
obvious to anyone who knows about dynamic libraries on a Mac?

Reply via email to