How to include external header/libs?


I would like to link to external static libs (.a) and header files into my oF projects. I am not sure how to do this using config.make. Is there somewhere i can read which gives more details about this?


i usually write an addon, even if i wanna just include a library.
header files (and static libs) should be linked automatically, if structured correctly. Not sure if there is a better documentation, but there is an ofxAddonTemplate and some pretty complex addon config files, e.g. ofxOpenCv that should give you an idea how to write an addon.

Hope that helps

1 Like

Thank s for that ! is there a simpler way of just specifying libs in config.cmake , similar to this thread? I am not familar with oF or addons so it will take me quite some effort to get it setup

Linux lib headers seem like they end up in /usr/include/ after installing them from a repository. To use these kinds with oF, the config.make can be modified like this:

# uncomment the following in config.make and add a flag to link a library, the tbb library in this case

# maybe add a path if needed with the following

The addons have some super nice advantages. They’re self-contained, portable, easy to update or modify, and easy to use.

Thanks for info !