Hi , I’m trying to build a small project using the TF CPP API.
cmake_minimum_required(VERSION 3.10)
project(TensorFlowCPPExample)
# Set TensorFlow directories
set(TENSORFLOW_INCLUDE_DIR $ENV{TENSORFLOW_INCLUDE_DIR})
set(TENSORFLOW_THIRD_PARTY_DIR $ENV{TENSORFLOW_THIRD_PARTY_DIR})
set(TENSORFLOW_LIB_DIR $ENV{TENSORFLOW_LIB_DIR})
# Include TensorFlow headers
include_directories(${TENSORFLOW_INCLUDE_DIR})
include_directories(${TENSORFLOW_THIRD_PARTY_DIR})
include_directories(/home/vorrtt3x/cloned/tensorflow/bazel-bin/tensorflow/core/framework)
# Add your executable
add_executable(example main.cpp)
# Link TensorFlow library
target_link_libraries(example /home/vorrtt3x/cloned/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so.2 )
target_link_libraries(example /home/vorrtt3x/cloned/tensorflow/bazel-bin/tensorflow/libtensorflow_framework.so.2)
I’m getting the following Error:
/home/vorrtt3x/cloned/tensorflow/tensorflow/core/public/session.h:24:10: fatal error: tensorflow/core/framework/device_attributes.pb.h: No such file or directory
24 | #include "tensorflow/core/framework/device_attributes.pb.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.