I am using the GNU autotools (including automake!) for my project. I would like to know if I could create a static and a shared library using libtool? Or would the declarations be separate? Would this:
LT_INIT(shared static)
work?
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.
Nothing besides
LT_INITis needed, it defaults to building both static and shared libraries. If you like, you can again explicitly state the defaults (but it is sort of redundant)edit: manual says
LT_INIT([shared])andLT_INIT([static])(combined toLT_INIT([shared static])shall also work. Also manual’s more precise wording on what’s default whenLT_INITis given:this macro turns on shared libraries if they are
available, and also enables static libraries if they don’t
conflict with the shared libraries.