0

I want to build a c++ executable such that all the libraries also get attached to the executable. What is the method of building such an executable? So, that whenever I compile my code using g++ on some other PC (running Ubuntu), it does not need the libraries needed for the running of that executable.

Xara
  • 8,178
  • 15
  • 50
  • 79

1 Answers1

3

What you mean is called static linking. Please have a look at this tutorial:

https://sites.google.com/site/malvanos/tutorials/static-linking-with-gcc

Rob
  • 11,041
  • 13
  • 54
  • 89