0

I am new to C and GCC. I am following Tensorflow in C and I have build it successfully.

For reference, below is my GCC command

gcc.exe -Iinclude -Llib test.c -ltensorflow -o test.exe

However, when I run the exe, I am getting an error saying

tensorflow.dll is missing

and if I copy the tensorflow.dll on the same location as the test.exe it works. Is it possible to make this exe independent of the library? In other words, I want to share only the exe with others and not the library.

Selva
  • 951
  • 7
  • 23
  • Does this answer your question? [Difference between static and shared libraries?](https://stackoverflow.com/questions/2649334/difference-between-static-and-shared-libraries) – Stephen Newell Aug 12 '21 at 04:57
  • Thanks for answer. I saw that and I also have tensorflow.lib file with me. But dont know what is the GCC argument to do a static linking. Do you know? – Selva Aug 12 '21 at 05:37
  • Your `.lib` file is likely not a static library if it's in the same folder as the dll (see the sentence in square brackets from the accepted answer). – Stephen Newell Aug 12 '21 at 12:24

0 Answers0