0

I have software which is built using a makefile. This makefile also contains (relative) paths to different programs (such as gsoap, postgresql and others) which provide stuff that I need to include. In Windows, I simply download them and extract/install them wherever I want them to be. But for Ubuntu, I often find the recommendation is to use apt-get to install software.

According to stuff I've read, apt-get doesn't install the programs into one directory, but splits them. That way I can't simply point to a directory where the makefile can find its stuff, right? How is that handled in Linux?

  • If you are talking about header files to use for compilation, they're installed in standard locations, e.g. /usr/include. But please make your question more concrete - it's difficult to say anything useful in extreme generality. And yes, you should use the package management system to install software whenever possible. – Faheem Mitha Apr 20 '16 at 16:29
1

I'll assume that you are talking about building/compiling C/C++ software on Ubuntu. This isn't clear from your question.

On a modern Linux distribution with a package management system (which includes virtually all the major distributions), you should always use the package management system to install software whenever possible.

In a Linux distribution the library itself, and the so-called "development" files required to build/compile against the library are usually packaged separately. These are often of the form libname (for the library), and libname-dev or libname-devel (for the "development" files). For C/C++ the development files are header files.

These header files are usually installed in standard locations by the package, where the compiler can find them at build time. These locations are normally inside /usr/include. You usually don't have to do anything special to point your compiler to those locations - it already knows about them.

0

If the software you're trying to build uses a decent build system, it should be possible to tell it where to find things it depends on. - That is if it doesn't find it automatically, which it should. - You'll probably need -dev/-devel versions of the packages to get the stuff your software needs to build.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.