Hello there everybody... I want to ask if there is a book on creating C++ libraries.
I thought a good approach to manipulating and using existing libraries is to learn the intracecies of creating and building them..
Any hints?
Thanks.
Hello there everybody... I want to ask if there is a book on creating C++ libraries.
I thought a good approach to manipulating and using existing libraries is to learn the intracecies of creating and building them..
Any hints?
Thanks.
First, make sure that you understand ODR and linkage
http://en.cppreference.com/w/cpp/language/definition
http://en.cppreference.com/w/cpp/language/storage_duration
The build mechanism is implementation specific.
A Tutorial revealed via a web search:
http://www.bogotobogo.com/cplusplus/libraries.php
(For the record: I do not agree with the 'whenever possible' in "Use dynamic libraries instead of static libraries whenever possible!")
Thank you Vijayan.. This will be a big help in getting started, but the structured nature of a book is what I was hoping to find. Does a book like this exist?
Obviously I love books.
You might also want to check out my article on understanding the build process.
But when it comes to creating libraries, the process of packaging the code into static / dynamic libraries is only the technical part of it. The most important thing is learning to design a good API that is easy to use, versatile and well-documented.
If your aim is to use existing libraries, you need to know almost nothing about how they were made. The point of a library is that someone else has already done all the making for you, so that you don't need to worry about the details. All you need to do to use it is #include
the right header, and link against the library.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.