Can a static libary *.a in Linux be dynamically loaded at runtime?
I’ve read here that
…both static and shared libraries can be used as dynamically loaded libraries.
How to dynamically load static library?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A static library is more or less just a collection of object files. If you want to use a static library in a program, you have to link the executable with it. The executable will then contain the static library (or the parts that you used).
If you want to load a static library at runtime using
dlopen, you will have to first create a dynamic librarylibfoo.socontaining it.