How to build C++ from a git repo

Question from csstudentbruh#5797

How do I make a makefile in order to compile a .cc file that uses libraries from a git repo

Okay so there are basically 2 questions there

  1. what are the commands to run to compile the git repo and include it in your code
  2. how to use a makefile to do it

In general using a makefile is just copy pasting the commands you would have run by hand so lets focus on question 1.

https://github.com/hzeller/rpi-rgb-led-matrix

Looking at the library, it looks like they have a make file which can build it.

So in broad strokes - build that library with something like make all, then build your code which references the header files in the library then link all the code together.

c++ is a nightmare, I'm truly sorry. It has the worst "build story" of any modern language.


<- Index