[flext] Compiling libs statically into an external

Kyle Machulis kyle at nonpolynomial.com
Fri Apr 1 17:26:30 CEST 2011


On OS X, you'll need to bring in CoreFoundation and IOKit too, to make
libusb happy. I have multiple externals that use flext with libusb
statically with no problems.

Here's a package.txt for one of the OS X ones, to give you an idea of what
my link line looks like:

https://github.com/qdot/np_lightstone/blob/master/package.txt

On Fri, Apr 1, 2011 at 12:22 AM, Thomas Grill <gr at grrrr.org> wrote:

> Hi Spencer,
> have a look at e.g. py/pyext in the SVN.
> It has some additional scripts in the build folder that add compiler and
> linker flags.
> You'll need to add the header search path to the compiler flags and
> something like "-L pathtolibsub -lusb" to the linker flags.
> I think on OSX there's a caveat that the linker prefers to link in a shared
> library version, if also available. In this case you could also just add
> your pathtolibusb/libusb.a library to the linker flags.
> gr~~~
>
> Am 01.04.2011 um 04:53 schrieb Spencer Russell:
>
> > I've got an external that uses libusb, and so far it's working great
> > on Linux with PD and OSX with Max/MSP. As I'm starting to think about
> > distribution it would be great if it was just a single external that I
> > could distribute, especially for the OSX users who don't have as
> > convenient a way to install shared libs.
> >
> > What would be the best way to get the flext build system to link
> > libusb statically into my external?
> >
> > Thanks,
> > Spencer
> > _______________________________________________
> > http://grrrr.org/ext/flext
> >
> > flext mailing list
> > flext at grrrr.org
> > http://grrrr.org/cgi-bin/mailman/listinfo/flext
>
> --
> Thomas Grill
> http://grrrr.org
> +43 699 19715543
>
> _______________________________________________
> http://grrrr.org/ext/flext
>
> flext mailing list
> flext at grrrr.org
> http://grrrr.org/cgi-bin/mailman/listinfo/flext
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20110401/0e780241/attachment.htm>


More information about the flext mailing list