TensorFlow 2.10.0  build for C++ using Bazel failed with error "Link.exe 1120 failed: error executing command " in Windows 10 
@ajithrp123,
 Apologies for the delay. Could you please run the above command again on the latest commit and let us know the issue you are facing? Also most of the bugs are resolved on the latest tensorflow commit. Thank you! @tilakrayal 
Thanks for the reply

I need to build TensorFlow source for my C++ application in both CPU and GPU machines. 
As per TensorFlow.org website, GPU support is available only till TensorFlow 2.10.0 version.
Hence I have chosen the version https://github.com/tensorflow/tensorflow/tree/v2.10.0

Is it possible to continue the build with this version itself?  
Or, is there any other option to build for the GPU also? @mraunak , Could you please take a look into this? Hi, @ajithrp123, for using TensorFlow GPU on Windows, you will need to build/install TensorFlow in WSL2 or use tensorflow-cpu with TensorFlow-DirectML-Plugin. Please follow the link https://www.tensorflow.org/install/source_windows @mraunak  Thanks for the reply
I need to build TensorFlow source for my C++ application in both CPU and GPU machines.
I using tensorflow 2.10.0. As per tensorflow.org(https://www.tensorflow.org/install/source_windows) WSL or direct ML plugin needed for tensorflow versions from 2.11.

Is WSL needed to build tensorflow 2.10.0?
Is there any additional steps needed to build tensorflow 2.10.0 in native windows for cpp? Hi @ajithrp123, got it, thank you, could you please share the steps you are following and the errors you are getting while running TF 2.10.0? No WSL is not needed for TF 2.10.0 hi  @mraunak thanks for the response

### **Please find the below steps which I have followed**
1. Installed Bazel version 5.1.1 and set the environment variables.
2. Installed msys2 and set the environment variables.
3. Installed visual studio professional 2019 for C++ build .
4. Installed python 3.9.13
5. Installed python dependencies like numpy, wheel, keras
6. Downloaded tensorflow 2.10.0 source from tensorflow github repository
7. Set BAZEL_SH, VC,VS,FULL_VERSION environment variables
8. Configured TensorFlow with default configuration using ‘./configure’
9. Build TensorFlow using the command
‘bazel --host_jvm_args=-Xmx4g --output_base=D:\0 build --jvmopt="-server -Xms2g" --config=opt tensorflow:tensorflow_cc’

### **Build Error :**
D:\TF_Building\cc_tensorflow-2.10.0>bazel --host_jvm_args=-Djavax.net.ssl.trustStore="C:\Program Files\Java\jdk1.8.0_144\jre\lib\security\cacerts" --host_jvm_args=-Djavax.net.ssl.trustStorePassword=changeit --host_jvm_args=-Xmx4g  build --jvmopt="-server -Xms2g" --config=opt //tensorflow:tensorflow_cc
WARNING: Running Bazel server needs to be killed, because the startup options are different.
Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=157
INFO: Reading rc options for 'build' from d:\tf_building\cc_tensorflow-2.10.0\.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Options provided by the client:
  'build' options: --python_path=C:/Users/1024182/AppData/Local/Programs/Python/Python39/python.exe
INFO: Reading rc options for 'build' from d:\tf_building\cc_tensorflow-2.10.0\.bazelrc:
  'build' options: --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false
INFO: Reading rc options for 'build' from d:\tf_building\cc_tensorflow-2.10.0\.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=C:/Users/1024182/AppData/Local/Programs/Python/Python39/python.exe --action_env PYTHON_LIB_PATH=C:/Users/1024182/AppData/Local/Programs/Python/Python39/lib/site-packages --python_path=C:/Users/1024182/AppData/Local/Programs/Python/Python39/python.exe --copt=/d2ReducedOptimizeHugeFunctions --host_copt=/d2ReducedOptimizeHugeFunctions --define=override_eigen_strong_inline=true
INFO: Reading rc options for 'build' from d:\tf_building\cc_tensorflow-2.10.0\.bazelrc:
  'build' options: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/common,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils
INFO: Found applicable config definition build:short_logs in file d:\tf_building\cc_tensorflow-2.10.0\.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file d:\tf_building\cc_tensorflow-2.10.0\.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1INFO: Found applicable config definition build:opt in file d:\tf_building\cc_tensorflow-2.10.0\.tf_configure.bazelrc: --copt=/arch:AVX --host_copt=/arch:AVX
INFO: Found applicable config definition build:windows in file d:\tf_building\cc_tensorflow-2.10.0\.bazelrc: --copt=/W0 --host_copt=/W0 --copt=/Zc:__cplusplus --host_copt=/Zc:__cplusplus --copt=/D_USE_MATH_DEFINES --host_copt=/D_USE_MATH_DEFINES --features=compiler_param_file --copt=/d2ReducedOptimizeHugeFunctions --host_copt=/d2ReducedOptimizeHugeFunctions --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 --config=monolithic --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN --copt=-DNOGDI --host_copt=-DNOGDI --copt=/experimental:preprocessor --host_copt=/experimental:preprocessor --linkopt=/DEBUG --host_linkopt=/DEBUG --linkopt=/OPT:REF --host_linkopt=/OPT:REF --linkopt=/OPT:ICF --host_linkopt=/OPT:ICF --verbose_failures --features=compiler_param_file --distinct_host_configuration=false
INFO: Found applicable config definition build:monolithic in file d:\tf_building\cc_tensorflow-2.10.0\.bazelrc: --define framework_shared_object=false --experimental_link_static_libraries_once=false
INFO: Analyzed target //tensorflow:tensorflow_cc (269 packages loaded, 20666 targets configured).
INFO: Found 1 target...
ERROR: D:/tf_building/cc_tensorflow-2.10.0/tensorflow/BUILD:1156:21: Linking tensorflow/tensorflow_cc.dll failed: (Exit 1120): link.exe failed: error executing command
  cd /d C:/users/1024182/_bazel_1024182/gigze6o2/execroot/org_tensorflow
  SET LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64
    SET PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\\x64;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\devinit;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\\MSBuild\Current\Bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\;;C:\WINDOWS\system32;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\VC\Linux\bin\ConnectionManagerExe
    SET PWD=/proc/self/cwd
    SET PYTHON_BIN_PATH=C:/Users/1024182/AppData/Local/Programs/Python/Python39/python.exe
    SET PYTHON_LIB_PATH=C:/Users/1024182/AppData/Local/Programs/Python/Python39/lib/site-packages
    SET RUNFILES_MANIFEST_ONLY=1
    SET TEMP=C:\Users\1024182\AppData\Local\Temp
    SET TF2_BEHAVIOR=1
    SET TMP=C:\Users\1024182\AppData\Local\Temp
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe @bazel-out/x64_windows-opt/bin/tensorflow/tensorflow_cc.dll-2.params
**# Configuration: 49364d498d2e60c64c08a94404aa46742b697c047bdd88e3c7913989a8abad35
**# Execution platform: @local_execution_config_platform//:platform****
stdout (C:/users/1024182/_bazel_1024182/gigze6o2/execroot/org_tensorflow/bazel-out/_tmp/actions/stdout-12130) exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping
Target //tensorflow:tensorflow_cc failed to build
INFO: Elapsed time: 8002.569s, Critical Path: 968.80s
INFO: 7482 processes: 878 internal, 6604 local.
FAILED: Build did NOT complete successfully @ajithrp123 Could you please share the file content C:/users/1024182/_bazel_1024182/gigze6o2/execroot/org_tensorflow/bazel-out/_tmp/actions/stdout-12130 to us? It should contain the error detail information. 

Thank you. @shangerxin thanks for the response
I have added the C:/users/1024182/_bazel_1024182/gigze6o2/execroot/org_tensorflow/bazel-out/_tmp/actions/stdout-12130  file in [https://github.com/ajithrp123/tensorflow_2.10.0_build_error/blob/main/stdout-12130.txt]
please find the file > @shangerxin thanks for the response I have added the C:/users/1024182/_bazel_1024182/gigze6o2/execroot/org_tensorflow/bazel-out/_tmp/actions/stdout-12130 file in [https://github.com/ajithrp123/tensorflow_2.10.0_build_error/blob/main/stdout-12130.txt] please find the file

OK. I have got the file. I will check and test it locally. Thanks. > > @shangerxin thanks for the response I have added the C:/users/1024182/_bazel_1024182/gigze6o2/execroot/org_tensorflow/bazel-out/_tmp/actions/stdout-12130 file in [https://github.com/ajithrp123/tensorflow_2.10.0_build_error/blob/main/stdout-12130.txt] please find the file
> 
> OK. I have got the file. I will check and test it locally. Thanks.

@shangerxin thanks for the response and your time
tensorflow 2.9.0 cc build is working properly. But issue only in 2.10.0 cc build.
Is there any additional steps or any build configurations to be modified to build cc in tensorflow 2.10.0? > > > @shangerxin thanks for the response I have added the C:/users/1024182/_bazel_1024182/gigze6o2/execroot/org_tensorflow/bazel-out/_tmp/actions/stdout-12130 file in [https://github.com/ajithrp123/tensorflow_2.10.0_build_error/blob/main/stdout-12130.txt] please find the file
> > 
> > 
> > OK. I have got the file. I will check and test it locally. Thanks.
> 
> @shangerxin thanks for the response and your time tensorflow 2.9.0 cc build is working properly. But issue only in 2.10.0 cc build. Is there any additional steps or any build configurations to be modified to build cc in tensorflow 2.10.0?

@ajithrp123 I have tried to add new link option into the compilation command. 
```
 --linkopt=/FORCE:MULTIPLE
```
The duplicated symbol error is mitigated but there are new link errors. I will work on it and let you know the result. Thanks.  @shangerxin  thanks for the update , looking forward for your solution
One doubt, Is it possible to build tensorflow_cc.dll in windows for tf2.10.0 or is there any bug in the build setup?  > @shangerxin thanks for the update , looking forward for your solution One doubt, Is it possible to build tensorflow_cc.dll in windows for tf2.10.0 or is there any bug in the build setup?

@ajithrp123  Yes it is supported. I can see the target tensorflow_cc from the file
```
tensorflow\BUILD

tf_cc_shared_library(
    name = "tensorflow_cc",
    additional_linker_inputs = [
        "//tensorflow:tf_exported_symbols.lds",
        "//tensorflow:tf_private_symbols.lds",
        "//tensorflow:tf_version_script.lds",
    ],
...
```
I'm still investigating the why there are so many link errors. Wil update the result later. Thanks.  @ajithrp123 

> > @shangerxin thanks for the update , looking forward for your solution One doubt, Is it possible to build tensorflow_cc.dll in windows for tf2.10.0 or is there any bug in the build setup?
> 
> @ajithrp123 Yes it is supported. I can see the target tensorflow_cc from the file
> 
> ```
> tensorflow\BUILD
> 
> tf_cc_shared_library(
>     name = "tensorflow_cc",
>     additional_linker_inputs = [
>         "//tensorflow:tf_exported_symbols.lds",
>         "//tensorflow:tf_private_symbols.lds",
>         "//tensorflow:tf_version_script.lds",
>     ],
> ...
> ```
> 
> I'm still investigating the why there are so many link errors. Wil update the result later. Thanks.

I have double confirmed with the Team. The target tensorflow_cc is not support Windows platform. You can check these files:

https://github.com/tensorflow/tensorflow/blob/3d79c0e4a663a4dd846c38cb5cdc0beeb3292d83/tensorflow/python/BUILD#L630-L640
https://github.com/tensorflow/tensorflow/blob/1dbc8d1b0126dcac5edea9a65a1fddbfe5e337ce/tensorflow/compiler/mlir/lite/experimental/tac/py_wrapper/BUILD#L37-L41

The Windows platform has no dependency files. 
 Thank you @shangerxin @shangerxin thanks for the confirmation.
@tilakrayal @mraunak @sachinprasadhs thanks for the support.
Closing this issue with the following confirmation ,
**tensorflow 2.10.0  c++  build(tensorflow_cc) in windows is not supported** 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/61226">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/61226">No</a>
 > @shangerxin thanks for the confirmation. @tilakrayal @mraunak @sachinprasadhs thanks for the support. Closing this issue with the following confirmation , **tensorflow 2.10.0 c++ build(tensorflow_cc) in windows is not supported**

Can older version of tensorflow  support C++ tensorflow_cc in windows? > @ajithrp123
> 
> > > @shangerxin thanks for the update , looking forward for your solution One doubt, Is it possible to build tensorflow_cc.dll in windows for tf2.10.0 or is there any bug in the build setup?
> > 
> > 
> > @ajithrp123 Yes it is supported. I can see the target tensorflow_cc from the file
> > ```
> > tensorflow\BUILD
> > 
> > tf_cc_shared_library(
> >     name = "tensorflow_cc",
> >     additional_linker_inputs = [
> >         "//tensorflow:tf_exported_symbols.lds",
> >         "//tensorflow:tf_private_symbols.lds",
> >         "//tensorflow:tf_version_script.lds",
> >     ],
> > ...
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > I'm still investigating the why there are so many link errors. Wil update the result later. Thanks.
> 
> I have double confirmed with the Team. The target tensorflow_cc is not support Windows platform. You can check these files:
> 
> https://github.com/tensorflow/tensorflow/blob/3d79c0e4a663a4dd846c38cb5cdc0beeb3292d83/tensorflow/python/BUILD#L630-L640
> 
> 
> https://github.com/tensorflow/tensorflow/blob/1dbc8d1b0126dcac5edea9a65a1fddbfe5e337ce/tensorflow/compiler/mlir/lite/experimental/tac/py_wrapper/BUILD#L37-L41
> 
> The Windows platform has no dependency files.
it is meaning of this. Can not C++ project with tensorflow on windows os? > > @shangerxin thanks for the confirmation. @tilakrayal @mraunak @sachinprasadhs thanks for the support. Closing this issue with the following confirmation , **tensorflow 2.10.0 c++ build(tensorflow_cc) in windows is not supported**
> 
> Can older version of tensorflow support C++ tensorflow_cc in windows?

@hidon  Yes , I have tried tensorflow 2.9.0 and I am able to generate tensorflow_cc.dll in windows using the steps mentioned in previous replies. > > > @shangerxin thanks for the confirmation. @tilakrayal @mraunak @sachinprasadhs thanks for the support. Closing this issue with the following confirmation , **tensorflow 2.10.0 c++ build(tensorflow_cc) in windows is not supported**
> > 
> > 
> > Can older version of tensorflow support C++ tensorflow_cc in windows?
> 
> @hidon Yes , I have tried tensorflow 2.9.0 and I am able to generate tensorflow_cc.dll in windows using the steps mentioned in previous replies.

@ajithrp123  thank you very much. I will try 2.9.0. > > > @shangerxin thanks for the confirmation. @tilakrayal @mraunak @sachinprasadhs thanks for the support. Closing this issue with the following confirmation , **tensorflow 2.10.0 c++ build(tensorflow_cc) in windows is not supported**
> > 
> > 
> > Can older version of tensorflow support C++ tensorflow_cc in windows?
> 
> @hidon Yes , I have tried tensorflow 2.9.0 and I am able to generate tensorflow_cc.dll in windows using the steps mentioned in previous replies.

Which version of Python use with tensorflow 2.9.0? I got error python 3.9.13 version. > > > > @shangerxin thanks for the confirmation. @tilakrayal @mraunak @sachinprasadhs thanks for the support. Closing this issue with the following confirmation , **tensorflow 2.10.0 c++ build(tensorflow_cc) in windows is not supported**
> > > 
> > > 
> > > Can older version of tensorflow support C++ tensorflow_cc in windows?
> > 
> > 
> > @hidon Yes , I have tried tensorflow 2.9.0 and I am able to generate tensorflow_cc.dll in windows using the steps mentioned in previous replies.
> 
> Which version of Python use with tensorflow 2.9.0? I got error python 3.9.13 version.

@hidon which error you are getting ?  It will work in python 3.9.13 if not can you try with python 3.8.0. For me i have tried in these two python versions and both worked for me. @ajithrp123 thanks for reply. build is succesfully completede with 3.8.0. but get unresolved external error with ms visual stdio C++ desktop when build it windwos 10.

added additional dependencies (bazel build --config=opt //tensorflow:tensorflow.lib)
tensorflow.lib
tensorflow_cc.lib
include directory (bazel build --config=opt //tensorflow:install_headers)
../include
../include/src

ms visul stdio configuration is release and platform is x64.

Actullay my target is compiling saved_model_bundle_test.cc (tensorflow/cc/saved_model ) but I can not do it on windows 10.
 then I will adapt my project.


Can you give me suggestion? thanks. > > @ajithrp123
> > > > @shangerxin thanks for the update , looking forward for your solution One doubt, Is it possible to build tensorflow_cc.dll in windows for tf2.10.0 or is there any bug in the build setup?
> > > 
> > > 
> > > @ajithrp123 Yes it is supported. I can see the target tensorflow_cc from the file
> > > ```
> > > tensorflow\BUILD
> > > 
> > > tf_cc_shared_library(
> > >     name = "tensorflow_cc",
> > >     additional_linker_inputs = [
> > >         "//tensorflow:tf_exported_symbols.lds",
> > >         "//tensorflow:tf_private_symbols.lds",
> > >         "//tensorflow:tf_version_script.lds",
> > >     ],
> > > ...
> > > ```
> > > 
> > > 
> > >     
> > >       
> > >     
> > > 
> > >       
> > >     
> > > 
> > >     
> > >   
> > > I'm still investigating the why there are so many link errors. Wil update the result later. Thanks.
> > 
> > 
> > I have double confirmed with the Team. The target tensorflow_cc is not support Windows platform. You can check these files:
> > https://github.com/tensorflow/tensorflow/blob/3d79c0e4a663a4dd846c38cb5cdc0beeb3292d83/tensorflow/python/BUILD#L630-L640
> > 
> > https://github.com/tensorflow/tensorflow/blob/1dbc8d1b0126dcac5edea9a65a1fddbfe5e337ce/tensorflow/compiler/mlir/lite/experimental/tac/py_wrapper/BUILD#L37-L41
> > 
> > The Windows platform has no dependency files.
> > it is meaning of this. Can not C++ project with tensorflow on windows os?

@hidon It means the target of TF 2.10.0 is not support on Windows.  @shangerxin Actually Correct question, which version of tensorflow is support on windows?

I need for my desktop C++ project. this project will use saved tensorflow model. I did not find good guide documents like this https://www.tensorflow.org/install/source_windows.
thanks.
 > @ajithrp123 thanks for reply. build is succesfully completede with 3.8.0. but get unresolved external error with ms visual stdio C++ desktop when build it windwos 10.
> 
> added additional dependencies (bazel build --config=opt //tensorflow:tensorflow.lib) tensorflow.lib tensorflow_cc.lib include directory (bazel build --config=opt //tensorflow:install_headers) ../include ../include/src
> 
> ms visul stdio configuration is release and platform is x64.
> 
> Actullay my target is compiling saved_model_bundle_test.cc (tensorflow/cc/saved_model ) but I can not do it on windows 10. then I will adapt my project.
> 
> Can you give me suggestion? thanks.

@hidon  Is this link error. Link error is expected one because not all the symbols exported to tensorflow_cc.dll. We need to manually export (using TF_EXPORT) needed symbols to dll.
Please look into the following tutorial for reference
[https://medium.com/vitrox-publication/deep-learning-frameworks-tensorflow-build-from-source-on-windows-python-c-cpu-gpu-d3aa4d0772d8](url) @ajithrp123, @shangerxin thanks to you. Tensorflow model exported C++ on Windows is completed successfully. shared my route this link  --> https://github.com/hidon/Tensorflow-to-C- @hidon  nice to hear from you. It would be great if you can share what are the functions/classes exported manually using TF_EXPORT. So that if anyone doing the same then they can easily do it. It would save more time for others.
### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

2.10.0

### Custom code

No

### OS platform and distribution

Windows 10 Pro

### Mobile device

Windows 10 Pro

### Python version

3.9.13

### Bazel version

5.1.1

### GCC/compiler version

_No response_

### CUDA/cuDNN version

11.2/8.1

### GPU model and memory

_No response_

### Current behavior?

Steps followed:
1. Installed Bazel version 5.1.1 and set the environment variables.
2. Installed msys2 and set the environment variables.
3. Installed visual studio professional 2019 for C++ build .
4. Installed python 3.9.13
5. Installed python dependencies like numpy, wheel, keras
6. Downloaded tensorflow 2.10.0 source from tensorflow github repository
7. Configured TensorFlow with default configuration using ‘./configure’
8. Build TensorFlow using the command 
              ‘bazel --host_jvm_args=-Xmx4g --output_base=D:\0 build --jvmopt="-server -Xms2g" --config=opt tensorflow:tensorflow_cc’

While tried to build ‘tensorflow_cc’ with the above command, the compilation is success but the linking failed with error 1120.

The following versions of tools are used for building:
Tensorflow        - 2.10.0
Python - 3.9.13
Visual studio - Professional 2019
Bazel     - 5.1.1
MSYS    - 2
Tried the GPU build with ‘Cuda 11.2 and Cudnn 8.1’ also but the result is same.

Note: Earlier tried to build tensorflow.dll (not tensorflow_cc), for which the compilation and linking was success and tensorflow.dll got generated.
But while linking the tensorflow.dll to visual studio cpp project, I got 'unresolved external symbol errors'. It seems the dll generated by this method has the ‘C’ symbols instead of ‘CPP’ symbols in it.


### Standalone code to reproduce the issue

```shell
Tensorflow source from github and tried to build from windows for c++.
```


### Relevant log output

```shell
Getting link errors
```
