Reputation: 4028
I wrote a program, that uses a shared library installed on my system. This library is seldom installed on other systems. How do I compile my program so that the library doesn't need to be installed on other systems? I have the source code for the library available. What's the best way?
The other systems of course have the same architecture and OS.
Upvotes: 0
Views: 923
Reputation: 7802
Though the OP had solved his problem by answering a different question, there are (at least) two ways to wedge a shared library into your binary in case
The first is statifier (open source but limited to x86 and x86_64 and only object code)
The second that I know of is magic ermine (by the same developer). It is closed source, but the developer is friendly to opensource projects and ermine has the advantage of supporting more platforms as well as the ability to include all necessary data files within its virtual file system.
http://statifier.sourceforge.net/ and http://www.magicermine.com/
Upvotes: 1
Reputation: 798636
Compile it as a static library and link that into the executable.
Upvotes: 3