Linking a .dylib on Mac OS - Shared Code builds, all other targets fail

Hello!

I’m trying to integrate the Tensorflow C++ API into a plugin. I managed to get it working on Windows, but on Mac OS I’m running into a problem.

I’ve built libtensorflow.2.8.0.dylib from source according to the instructions. I’ve added its folder to the “Extra Library Search Paths” configuration, and added tensorflow.2.8.0 to the “External libraries to link” configuration in the Projucer.

My problem is that actually the Shared Code target runs successfully and generates the .a file, but all other builds - VST3, AU, Standalone - fail with a number of “Undefined symbol” errors all referring to the tensorflow Library.

I’ve checked to make sure and the library search path and the -ltensorflow.2.8.0 flag is present and correct in all schemes. This happens in both Release and Debug builds. Does anyone have any idea what’s going wrong here? The same setup worked for me without issue on Windows (linking a .lib file)