Link errors
Error messages with the C/C++ compiler can be more challenging to decipher. One of the new kinds of error you may encounter are linker errors. These occur during the compilation process where you refer to a function coded elsewhere, such as in a library.
When you get these errors you will get a message from ld
, the linker tool. An example is shown below, where we removed the -l SplashKit
library reference. This means the linker cannot find the SplashKit functions we used.
A linker error like this indicates you have a missing library reference, or you have not yet implemented some part of the code (as we will see later). For now, if you see these kinds of errors, make sure you have linked in the required libraries when you run the compiler.