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,748
  • 16
  • 52
  • 82

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,492
  • 14
  • 59
  • 94