Reputation: 9098
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.
Upvotes: 0
Views: 151
Reputation: 11798
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
Upvotes: 3