![]() If extracted to /usr/local, explicitly pass the library location to If the program doesn't build, make sure that gcc can access the TensorFlow C Success: The TensorFlow C library is configured. Hello from TensorFlow C library version 2.14.0 Printf("Hello from TensorFlow C library version %s\n", TF_Version()) Ĭompile the example program to create an executable, then run: gcc hello_tf.c -ltensorflow -o hello_tf. With the TensorFlow C library installed, create an example program with theįollowing source code ( hello_tf.c): %%writefile hello_tf.c ~/mydir, then configure the linker environmental variables:Įxport LIBRARY_PATH=$LIBRARY_PATH:~/mydir/libĮxport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/mydir/libĮxport DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:~/mydir/lib If you extract the TensorFlow C library to a non-system directory, such as Such as /usr/local, configure the linker with ldconfig: sudo ldconfig /usr/local/lib ![]() On Linux/macOS, if you extract the TensorFlow C library to a system directory, ![]() On Linux and macOS, you may want to extract to /usr/local/lib: FILENAME=libtensorflow-cpu-linux-x86_64-2.14.0.tar.gz wget -q -no-check-certificate $ Linker Your C program and the shared libraries to link against.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |