How to compile all dependencies and shared libraries into one binary

I want to compile all dependencies, etc. and shared libraries to binary?

How to do it?

g++ -std=c++11 txtocr.cpp -o txtocr -llept -ltesseract

      

Tesseract depends on leptonica

some common libraries as well tesseract

. But how to compile everything to binary so it will be 100% portable

+3


source to share


1 answer


I believe the answer is " It depends ." If you only have a shared library with no library code , I'm afraid the answer is NO , since not all of the data required to create a static application is within your dynamic library.



0


source







All Articles