I wrote a program which uses Cryptopp library. I have created the static library and will include it my distribution, but the program also requires a lot of header files. My question is do I need to include all those header files with my distribution?
For examples, I wrote a code which uses des.h, modes.h and filters.hwhich in turn is based on other header files in Cryptopp, a long chain. Do I include all header files from the Cryptopp library?
Making it more general, if I write some code which use other libraries(like Cryptopp or boost) what all do I need to include in distro?
Update: I want to distribute the source, not just the binaries. So that the user can compile my program from scratch if we wants to. I’m including the static library, but confused about header files. Do I need to include them all?
No, you only distribute binary files. You don’t need headers to run a program.
If, however, you’re distributing a library (not a program), you need to supply headers. Your headers, not third-party headers.
You can exclude the third-party headers by a number of techniques, if they are part of the implementation only. If not, you’ll need to supply them also. Assuming you don’t need that, and you only use them internally, you can use forward declarations:
This way, you only need to include the third-party header in your implementation file, which you don’t distribute anyway.