How to make shared library form static libraries (pjsip)
I'm using SIP library (pjsip) that is compiled into multiple static libraries. It doesn't have an option to compile it as shared libraries so they are compiles as static libraries by default. I have some small wrapper code that is calling all needed functions in the static libraries (from C++ wrapper as extern "C" some_pjsip_function_name() ). There is no main() function in it. Now, I would like to build this wrapper code as shared library. I expected that all needed symbols from static libraries will be linked into shared library, but this is not the case. The shared library generated is too small (40 K or so).
My steps were:
In case you haven't read:
If anyone stumbles here, I've wrote two howtos on my site about C/C++ library programming on Linux (creating and using shared and static libraries).
Here are the links:
C/C++ library programming on Linux – Part one: Static libraries
C/C++ library programming on Linux – Part two: Dynamic libraries
No Linux info on pjsip page
With respect to Nadin, there is nothing at http://www.pjsip.org/pjlib/docs/html...ll__target.htm that will help in creating shared linux library.
Marko-M has excellent background info. For a working example that creates shared libraries for Android, you might also check out the CSipSimple project(http://code.google.com/p/csipsimple/), although what's going on there is cluttered up quite a bit by the Android NDK macros.
|All times are GMT -5. The time now is 05:41 AM.|