Answer the question
In order to leave comments, you need to log in
Installing Third Party Libraries in Makefile
I have a large C++ project that I compile (different parts are compiled as libraries and then linked) using a Makefile. Before this project, I had no experience with Makefile.
Now I am using a third party library -- GLPK ( www.gnu.org/software/glpk ) in my project. Before running the program, all developers and testers have to install GLPK separately first, and only then my program.
Is it possible to add a project dependency on an external library (in particular, GLPK) to the Makefile so that during compilation it is checked whether this library is installed and if not, it is installed from some URL. (something like dependencies in maven)
Thanks
Answer the question
In order to leave comments, you need to log in
You do not need to download it yourself, because. it is available in standard distributions, and depending on the distribution, it must be installed via yum, apt, zypper, pkg-add, etc.
It is enough to specify the dependencies in the README.
If you want them to be installed automatically, make installation packages.
For this, there is susestudio.com and https://abf.rosalinux.ru/
There are two good C++ project management systems, CMake and Scons . Here I most often had to work with Cmake, where it is quite simple and painless to search for headers and libraries in the standard directories of various systems. A lot of open source projects in C ++ use this build system - tutorials and customization examples by the shaft. The syntax of CMake is quite specific - you need to get used to it, but dependency management is implemented with a bang.
Tutor and one more and here are a few articles
You can consider CMake as an analogue of Gradle without repositories, it is not similar to Maven (
Like the commenter above, since you have not used build systems before and there is no principled position, it is better to choose something like CMake (extremely popular among C ++ developers) or waf (a build system that is gaining popularity, a great option for Python experts).
For CMake, everything is very easy to google on the Internet. For example, your case
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question