I've created a static library for interaction with a web service. When I use a static library, I need to开发者_如何学C include the compiled library and the header files in the project. Is there a way to protect the header code or include it in the compiled library?
The compiler needs the header files when you (or someone else) uses your library in a project. The header files cannot be included in the library file or hidden somewhere else.
You don't have to include the headers in distributed executables (apps).
精彩评论