I have the header files of a shared library but not the shared library nor its source code.
Can I still compile some code against this library?
If not, what information does the shared library contain which is not in the headers?
I have the header files of a shared library but not the shared library nor its source code.
Can I still compile some code against this library?
If not, what information does the shared library contain which is not in the headers?
For those who just want it done, aside from using a dummy lib, there is another (probably even less robust) option: patchelf
Execute the following command after linking complete
patchelf --add-needed missinglib.so mylib.so
For CMake users, this can be done automatically by adding
add_custom_command(
TARGET mylib POST_BUILD
COMMAND patchelf --add-needed missinglib.so "$<TARGET_FILE:mylib>")