I have seen many questions on Stack Overflow like "how to include curlpp etc in Visual Studio?"
If we have the code of these libraries available online, why do people explicitly use .lib
files to include to their projects when they can add the code directly to their project?
And I'm trying to achieve the above said thing for curlpp but I'm not successful, getting so many linker errors. Can someone suggest how to integrate the open source code directly which I wanted to do this even if this approach has drawbacks? Can you direct me to some blog post or steps to achieve this? And what are the drawbacks of this approach?
Edit: Compiling may not be a valid reason if I'm not dealing with large amount of code. And from users' point of view you still you have to distribute the binaries used by the project. Except the compilation factor and suppose the code is open source and there are no licensing issues, what can be the other drawbacks?
My main question is to know how to integrate such third party code directly.
Thanks for all drawbacks but I'm trying to experiment so can you guide me how to do this?
Libraries also help in: i. Componentization ii. Decoupling API's with implementations.
You also want to think of the cost of managing a monolith code. If you were to include the source code of libraries into the project, the well defined API boundaries will begin to fade over period of time.