Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do libraries usually come with header files?

I am currently making a small library of reusable code out of what has proven useful over the time and I'm wondering how are libraries usually deployed? I was under the impression that a .dll and .lib would be enough, but then, how do i reference the classes and functions? Is it common for a library to also come with a lot of .h files or there is a more elegant solution?

What about deployment of the actual application that uses the library? Once linked statically do I also need to send the .dll file or the content of the library is copied in the program?

like image 896
Taikand Avatar asked Dec 20 '22 08:12

Taikand


1 Answers

As a rule of thumb, you gather all your public methods, which you want to expose to end users, in a group of headers called API. At this point, you should make a distinction between internal headers and API headers and you will see that your header file number (API headers) will decrease and management of file structure will be a lot easier.

like image 160
fatihk Avatar answered Dec 24 '22 00:12

fatihk