Compiling other people’s code, for dummies

Here’s some stuff I didn’t know, when first I wanted to compile other people’s code.

  1. If there’s a CMakeLists.txt: mkdir build, cd build, cmake .., make
  2. If there’s only a Makefile, make
    • Subsequent “sudo make install” usually installs it somewhere accessible via path
  3. If you’re missing a library or header file FOO, probably: apt-get install libFOO-dev
    • But you should probably search packages to make sure. I usually use aptitude to search, though I think it’s deprecated and you should probably use apt-get install to do the installation

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.