Steps followed:
- Installed Bazel version 5.1.1 and set the environment variables.
- Installed msys2 and set the environment variables.
- Installed visual studio professional 2019 for C++ build .
- Installed python 3.9.13
- Installed python dependencies like numpy, wheel, keras
- Configured TensorFlow with default configuration using ‘./configure’
- 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.
→ Attached error screenshot
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.