I have downloaded mysql-connector-c-6.0.2. I build it using below commands:
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=<install_dir_path>
make
make install
This creates below library files:
libmysqlclient.a libmysqlclient_r.so libmysqlclient.so libmysql.so libmysql.so.16 libmysql.so.16.0.0
This does not generate libmysqlclient_r.a. How do I enable generation of libmysqlclient_r.a?
Thank you in advance for your help.
Update:
libmysqlclient_r.so is actually a symbolic link to libmysql.so (libmysqlclient_r.so and libmysqlclient.so are both symbolic links to libmysql.so. So they are both same). A static library (libmysql.a) can be produced by removing the SHARED keyword from the following line in libmysql/CMakeLists.txt:
ADD_LIBRARY(libmysql SHARED ${CLIENT_SOURCES} libmysql.def)
If it’s not generated, then it’s done by intent by developers.
Check some build options, maybe there is option to enable static build of
libmysqlclient_r. If not – you have to find its target declaration in one ofCMakeLists.txtand adjust it to enable static build.