0

FIXED: i download readline through https://tiswww.case.edu/php/chet/readline/rltop.html followed the install guide and it worked just fine

I deleted the readline.h file(not on purpose), i tried reinstalling it through brew, i even installed it through ports but now it just doesn't recognize it, leaving me with this message:

``implicit declaration of function 'readline' is invalid in C99 [-Werror,-Wimplicit-function-declaration]´´

in my .h file i have the following: #include <readline/readline.h>

include <readline/history.h>

and on my makefile i have (CC) -o $(@) $^ -I$(incs) -I .brew/opt/readline/include -lreadline

  • If that is the first error message the compiler gives you, then the missing `readline.h` file is not the issue. The compiler would have complained about that earlier. Please show a proper and complete [mre] for your issue, including information on how you are compiling the code. – user17732522 Sep 23 '22 at 11:58
  • Also please copy-paste the *full* and *complete* build log/output into the question. – Some programmer dude Sep 23 '22 at 11:59
  • See if this helps: ['readline/readline.h' file not found](https://stackoverflow.com/q/23085076/6865932) – anastaciu Sep 23 '22 at 12:02
  • Note that `readline()` is not a standard C library function. If compiling with only standard functions, it should not exist. – chux - Reinstate Monica Sep 23 '22 at 12:13
  • it means you have not included readline.h in your C code before referencing readline – stark Sep 23 '22 at 12:20
  • in my .h file i have the following: #include # include and on my makefile i have (CC) -o $(@) $^ -I$(incs) -I .brew/opt/readline/include -lreadline – Daniel Marcelino Sequeira Sep 23 '22 at 12:33
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 24 '22 at 16:00

0 Answers0