1

I'm trying to compile a plugin for Nuke which has a dependency with boost libraries. I've filled the headers/libs search paths and added libs to link binary with libraries in XCode.

It's compiling just fine, but when Nuke trying load the my plugin, error is poping out saying:

Library not loaded: libboost_atomic-mt-libstdc++.dylib

I believe have to hack up something more in XCode. Any Ideas?

Manos Nikolaidis
  • 21,608
  • 12
  • 74
  • 82
megaflow
  • 51
  • 3

2 Answers2

0

Compiling is only half the battle. You also need to make sure Nuke can find those same libraries at runtime, since they are dynamically linked.

In order to test the plugin, you can append the path to the directory containing the Boost libraries to the DYLD_LIBRARY_PATH environment variable (described here).

Once you've tested and confirmed that the Boost libraries you're using are compatible with Nuke's runtime, you should be able to use otool like this to embed either absolute or relative paths to the Boost libraries in the plugin library itself as a long-term solution.

Community
  • 1
  • 1
nrusch
  • 253
  • 2
  • 3
0

For macOS, NUKE plugins need to be built with GCC 4.0 in order to be compatible. The use of LLVM or GCC 4.2 is hardly producing compatible plugins. On macOS, NUKE is built on Snow Leopard, so The Foundry recommends third-party developers to do the same! If you build on up-to-date versions of macOS, they aren't usually compatible with older ones.

The resulting shared object file (.dylib) should be moved to your ~/.nuke directory (or into the NUKE plugin_path).

If you wanna build with the Intel compiler, replace it with g++ in your makefile, however you have to make sure that libstdc++ includes libs from the GCC 4.0 install in order to be compatible. Also it's recommended to use the 10.6 SDK to build plugins.

Some people say that you can, however, install GCC 4.2 (via Homebrew) and potentially compile with that version. But it depend on your case.

It must be useful to read Julik's post (2014) on building NUKE plugins: http://live.julik.nl/2014/12/the-hell-of-building-nuke-dylibs

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220