Skip to content

Issue with getline in Cygwin #2

@urbster1

Description

@urbster1

I get these errors when trying to compile in Cygwin:

In file included from boggle/boggle/bog.c:58:0:
boggle/boggle/extern.h:46:7: error: conflicting types for ‘getline’
 char *getline(char *);
       ^
In file included from /usr/include/ctype.h:4:0,
                 from boggle/boggle/bog.c:49:
/usr/include/sys/stdio.h:35:9: note: previous declaration of ‘getline’ was here
 ssize_t _EXFUN(getline, (char **, size_t *, FILE *));
         ^
make: *** [GNUmakefile:158: boggle/boggle/bog.o] Error 1

If I comment out this line in /usr/include/sys/stdio.h
ssize_t _EXFUN(getline, (char **, size_t *, FILE *));

then I get this error:

cribbage/io.c: In function ‘getline’:
cribbage/io.c:543:9: error: lvalue required as left operand of assignment
  stdscr = Msgwin;
         ^
cribbage/io.c:580:9: error: lvalue required as left operand of assignment
  stdscr = oscr;
         ^

Any way to find out how this could be made compatible? It's Cygwin 64 bit if that matters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions