Error messages even with headers

I was having trouble with the using readline() challenge. I tried copy and pasting some of the solutions posted here and I still get errors. #import <readline/readline.h> was included in the code. I keep getting the following two errors on each code I copy and paste:

Undefined symbols for architecture x86_64:
"_readline", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there a step that I’m missing? Thanks.

Including the header file is not sufficient; you must also add the library (containing readline) to your project.

Hi. Is how to do this explained in the book? I can’t seem to find it in the book or online.