I have a function for getline function in my code block.But while compiling the make file i get the following error:
cc -DMAIN -c -o terp.o terp.c
terp.c:130:1
There are at least three possible solutions.
As getline()
is not in standard c library, but in POSIX (and GLIBC), there could be switch to disable its extension (they enabled by default in GCC). Try compiling your source with command cc -DMAIN -std=c99 -c -o terp.o terp.c
.
If you need POSIX extensions, you have to rename your getline()
function to something else.
Remove #include
from your source, this error message will disappear. But you may become confused if POSIX's getline()
is used in your source code, as it will be replaced by yours.