Those are Linking errors, which tell you the linker cannot find definitions for the library you are using.You will have to link the library to your project.
gcc <your files for compilation> -lLibName
Read this for better understanding.
I still get the error even if
readline
-lreadline
gcc
The root cause of my issue is the order of the libraries/code: -lreadline (and other libraries) should be put right before -o options.
-o