DementedPurple wrote:What’s a link command? is it the same as the #include<SDL2/SDL.h>? The link command looks more like something I would use in the shell, or whatever the Linux version of the command prompt is called. I have a pretty clear understanding of command prompt on Windows, but not the terminal on Linux. I have a hard time calling it a terminal because I’m pretty sure the definition of terminal is a kind of keyboard and monitor that uses one computer and multiple terminals can use on computer.
If you wanna develop on Linux (or, honestly, use it for more than the most basic stuff), you'll pretty much need
to learn the terminal/shell/command line/whatever you want to call it.
Anyway, a big difference between the Linux world and the Windows world is that in Linux you generally don't care where on the file system software and libraries are: that's handled by the package manager. A side effect of this is that, if you can at all avoid it, you shouldn't install software manually - that's a power user move.
When you run a command like the one tepples gave you, the SDL2 libraries and headers are installed into the place where the system keeps libraries and headers. That's all you really ought to need to know. When you compile a C program with an include statement like "#include <SDL/SDL.h>", GCC (the C compiler) knows to look for SDL/SDL.h in the place where the system keeps headers.
Building a C program actually happens in two steps: compilation, and then linking. Compilation takes each C file and turns it into an object file (.o) - assembly basically, but each object file is self-contained; places where it has to call functions in other C files are just stubs at this point. Then the linker joins all the different object files together.
A "library" like SDL usually comes in two parts: the header files (.h), which tell the compiler what the names and types of the different functions/structures that the library provides are; and the shared object files (.so), which actually contain the compiled code - these are what DLLs are in Windows!
How are you compiling your code? If you're using an IDE, it should give you some way to specify the arguments you want to pass to the linker, and that's where you'll tell it to try to link with SDL. If you're using the command-line, the "link command" is actually one of your invocations of GCC, and again, you just need to give it an argument to tell it to link with SDL (I think "-lSDL2" should be fine but Hangin10's way should work too, you just need to put it in backticks: "gcc -o myprogram `pkg-config ...` obj1.o obj2.o ...", I think).