unable to compile tensorflow c++ code using cmake 
Hi @ranjith502 ,

We observed that you have not followed the standard template to report the issue.Please find the [template](https://github.com/tensorflow/tensorflow/issues/new?assignees=&labels=&projects=&template=tensorflow_issue_template.yaml) for same.

Also Cmake used to build TF1.x versions. Now Bazel is the recommended tool and officially supported tool for building Tensorflow from source. We recommend to use Bazel as build tool since it is officially tool for build and testing and also have extensive support both from Tensorflow and Bazel teams.


 thanks @SuryanarayanaY 
can give me some links how to build and run a simple program using bazel .. i already installed brazel in my system 
and followed this link https://tensorflow.juejin.im/api_guides/cc/guide.html
still i face the error 

![8](https://github.com/tensorflow/tensorflow/assets/85454586/a26b9065-248b-433f-8246-80e1fbce9e30)
 Hi @ranjith502 ,

You can check the documentation [here](https://www.tensorflow.org/install/source) as reference for building Tensorflow pip package. For C++ build options you can refer to the [bazelrc](https://github.com/tensorflow/tensorflow/blob/master/.bazelrc) file of TF repo. We don't have exhaustive documentation form building C++ API.

Please refer to some older tickets [link1](https://github.com/tensorflow/tensorflow/issues/23561#issuecomment-444221082),[link2](https://github.com/tensorflow/tensorflow/issues/59887)  for reference.

But before that please submit the issue in the issue template attached above providing all the details required.

Thanks!


 @SuryanarayanaY  thanks brother i will do that

 @ranjith502 ,

Could you please confirm whether you are able to compile the C++ code.

Please let us know if still have any issues.

Thanks! Yes brother.. it is working , i solved all the errors

On Tue, 30 May 2023, 10:41 SuryanarayanaY, ***@***.***> wrote:

> @ranjith502 <https://github.com/ranjith502> ,
>
> Could you please confirm whether you are able to compile the C++ code.
>
> Please let us know if still have any issues.
>
> Thanks!
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/tensorflow/tensorflow/issues/60627#issuecomment-1567763410>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AUL656T4HB6B6QPOXGEKN3DXIV6O3ANCNFSM6AAAAAAYGLEUTU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
 Hi @ranjith502 ,

Thanks for confirmation. Could you please spare some time to close the ticket if issue resolved. Thanks! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60627">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60627">No</a>

i followed this steps

1) i cloned the repo

2) cd tensorflow

3) mkdir examples

in examples folder i created helloworld.cc file and cmakelist.txt

this is cmakelist.txt file 

cmake_minimum_required(VERSION 3.8.0)
project(examples)

# Specify the path to the TensorFlow source directory
set(TENSORFLOW_SOURCE_DIR "D:/github_issues/tensorflow/tensorflow")

# Add the TensorFlow source directory to the CMake module path
list(APPEND CMAKE_MODULE_PATH "${TENSORFLOW_SOURCE_DIR}/cmake")

# Add the TensorFlow include directories
include_directories(${TENSORFLOW_SOURCE_DIR})
include_directories(${TENSORFLOW_SOURCE_DIR}/tensorflow/cc)
include_directories(${TENSORFLOW_SOURCE_DIR}/tensorflow/core)

# Build the hello-world executable
add_executable(hello-world hello-world.cc)
target_link_libraries(hello-world tensorflow)


after running the command cmake --build . --config Release

i got this error 

D:\github_issues\tensorflow\examples\hello-world.cc(1,10): fatal  error C1083: Cannot open include file: 'tensorflow/cc/client/cl
ient_session.h': No such file or directory [[D:\github_issues\tensorflow\examples\build\hello-world.vcxproj]]
![2](https://github.com/tensorflow/tensorflow/assets/85454586/3a8c3dae-fcd6-48c0-bf89-bb64af5bccfc)
![3](https://github.com/tensorflow/tensorflow/assets/85454586/61d90c15-2468-47cf-a074-e1190693bd4a)
![4](https://github.com/tensorflow/tensorflow/assets/85454586/359b81e6-30f9-43dc-bc04-f563726bc2c4)
![5](https://github.com/tensorflow/tensorflow/assets/85454586/6796388f-0f45-40b7-a369-47c6586e31c1)




