[Ardour-Dev] LADSPA plugins on Mac OS X
jesse at essej.net
Sun Feb 3 11:18:40 PST 2008
On Feb 3, 2008 1:04 PM, Otto Maddox <ottomaddox at fastmail.fm> wrote:
> Hi, I'm learning how to make LADSPA plugins for use on Mac OS X.
> As a starting point, I downloaded binary plugins from http://www.ardour.org/requirements_osx , but these packages don't come with sources. None of their respective homepages provides source distributions which compile on OS X. So I can only assume that these binary packages have been made by Ardour people.
Yeah, sorry about that, each plugin set was different to port and not
all of the build changes were folded back to the plugin's maintainers.
> Understanding the ladspa.h API is fine. I just need to know how to which compile to the appropriate dynamic library (.so or .dylib) format for OS X. I've been trying stuff like
> $ gcc -I. -Wall -dynamiclib -fPIC -o simpleplugin.so (or simpleplugin.dylib) simpleplugin.c
A compile line you want is something like this (you can use .so or .dylib):
gcc -flat_namespace -undefined suppress -bundle -o
simpleplugin.so simpleplugin.c -lbundle1.o -nostartfiles
> Can somebody please show me some example LADSPA source which works on Mac OS X, so that I can use it to learn how to make my own plugins?
You also need to make sure that you have proper static initialization
entry points for the shared library, you need to be careful because
the old _init() _fini() thing doesn't work quite the same on OS X.
You need to define your initializer as follows: (the function names
don't matter, the attribute stuff does):
__attribute__((constructor)) void _init()
and your destructor:
__attribute__((destructor)) void _fini()
More information about the Ardour-Dev