I am not sure this strictly a programming question, so I apologize if it is not.
I developed a few libraries in C++ that I mean to use in several different projects. Till now I kept copying the updated library in the folders of the various projects. As you can imagine this is not ideal, so I would like to create a "3rd-parties" folder where I save the libraries I write and other that I might download in the future.
How can I do this? And considering I'll want to share/release my code later on what is the best strategy to be sure that the used libraries are included in the code I deploy?
There are no hard and fast rules. But if these are 1) general-purpose, for 2) global sharing, then I'd suggest /usr/local/lib
(for your .a and .so libraries) and /usr/local/include
(for the corresponding headers).
Here's a good description of "standard file locations" for Linux:
If you want to share your modules with new project its better to organise them in a single folder and mark this folder as included library path in your new projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With