error: conflicting types for "getline"

Ryan Schmidt ryandesign at macports.org
Mon Dec 30 04:22:38 PST 2013


On Dec 30, 2013, at 02:49, Rinku Thakare <manjusha029 at gmail.com> wrote:

> i got the error while running tcl script 

While running which tcl script?


> gcc -DHAVE_CONFIG_H -I, -I ,-I.        -g    -c  dialog.c
> dialog.c:In function 'make_msg_box':
> dialog.c:780:5:warning:passing argument 2 of 'getline' from incompatible pointer type [enabled by default]
> In file included from xgraph.h:18:0,
>                  from dialog.c:11:
> /usr/include/stdio.h:677:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘char *’
> dialog.c:780:5: error: too few arguments to function ‘getline’
> In file included from xgraph.h:18:0,
>                  from dialog.c:11:
> /usr/include/stdio.h:677:20: note: declared here
> dialog.c: At top level:
> dialog.c:891:1: error: conflicting types for ‘getline’
> In file included from xgraph.h:18:0,
>                  from dialog.c:11:
> /usr/include/stdio.h:677:20: note: previous declaration of ‘getline’ was here
> make: *** [dialog.o] Error 1

Sounds like whatever program you’re compiling here has its own definition of the “getline” function, which is different from the “getline” function provided by OS X 10.7 and later. We sometimes deal with this by renaming the local “getline” function.




More information about the macports-users mailing list