Possible Duplicate:
Convert a Static Library to a Shared Library (create libsome.so from libsome.a): where’s my symbols?
In compiling C++ with Cmakefile, how can I create a dynamic library .so file out of .a static library file?
Possible Duplicate:
Convert a Static Library to a Shared Library (create libsome.so from libsome.a): where’s my symbols?
In compiling C++ with Cmakefile, how can I create a dynamic library .so file out of .a static library file?
If you are building the library, you are using CMake (as I guess from your question), and it is defined like this:
add_library(name-of-library
source1.cpp
source2.cpp
)
You can add the type of library you want to build after the name of the library. It can be STATIC
or SHARED
. So if you want to build a shared library (.so
), then the above should be transformed like this:
add_library(name-of-library SHARED
source1.cpp
source2.cpp
)
Hope this helps.