Hi everyone,
I am trying to compile the hello_tf.c example given below on an intel MBP, macOS 11.4
#include <stdio.h>
#include <tensorflow/c/c_api.h>
int main() {
printf("Hello from TensorFlow C library version %s\n", TF_Version());
return 0;
}
I have first tried to use the TensorFlow-metal python environment. It gives a linkage issue:
ld: warning: dylib (/Users/mathieu/tensorflow-metal/lib/python3.8/site-packages/tensorflow/libtensorflow_framework.2.5.0.dylib) was built for newer macOS version (12.0) than being linked (11.0)
Undefined symbols for architecture x86_64: "_TF_Version", referenced from: _main in main.cpp.o
I then tried to use the framework 2.4 from tensorflow_macos but I get the same issue with that warning:
ld: warning: dylib (/Users/mathieu/tensorflow_macos_venv/lib/python3.8/site-packages/tensorflow/libtensorflow_framework.2.4.0.dylib) was built for newer macOS version (11.2) than being linked (11.0)
I wonder how to get compilation fixed.
Thanks