I have created a static library with bulk of classes. I want use that static library in my current project. I want to avoid that bulk of .h files in my app.
Is there any way to use only .a file.
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.
There is no way that other user code could use your library if you don’t tell it the interfaces that it may use.
If you have a bulk of interfaces that you don’t want to expose to the code that uses your library, you’d just have to structure it better.
Create one single
mylib-interface.hfile that has all the interfaces that you want to export and that adds all those that you must, e.gstructdeclarations that must be visible for the wanted interfaces to work. Eliminate all these interfaces from you other .h files and includemylib-interface.hat the top of all of those.Now any application that wants to use your library just has to use one file,
mylib-interface.h.