Skip to content

ncurses demos: compile error with ncurses 6.0.20150808 GCC 6.3 #364

@GitMensch

Description

@GitMensch

Built under MinGW with make INFOEX=N CC="gcc $(ncursesw6-config --cflags)" LIBCURSES="$(ncursesw6-config --libs) -lpanelw" -k (something we may add to ncurses/README.md)

gcc -D_XOPEN_SOURCE=500 -I/mingw/include/ncursesw -I/mingw/include -Wall -Wextra -Werror -pedantic -O3 -D_XOPEN_SOURCE_EXTENDED -ombrot ../demos/mbrot.c -L/mingw/lib -lncursesw -lpsapi
../demos/mbrot.c: In function 'show_mandelbrot':
../demos/mbrot.c:111:27: error: implicit declaration of function 'alloc_pair' [-Werror=implicit-function-declaration]
                 int idx = alloc_pair( bot_rgb, top_rgb);
                           ^~~~~~~~~~
../demos/mbrot.c: In function 'main':
../demos/mbrot.c:248:13: error: implicit declaration of function 'init_extended_color' [-Werror=implicit-function-declaration]
             init_extended_color( i + COLOR0, red * 35 / 9, grn * 35 / 9, blu * 35 / 9);
             ^~~~~~~~~~~~~~~~~~~
../demos/mbrot.c:342:16: error: implicit declaration of function 'reset_color_pairs' [-Werror=implicit-function-declaration]
                reset_color_pairs( );
                ^~~~~~~~~~~~~~~~~
cc1.exe: all warnings being treated as errors
make: *** [mbrot] Error 1

gcc -D_XOPEN_SOURCE=500 -I/mingw/include/ncursesw -I/mingw/include -Wall -Wextra -Werror -pedantic -O3 -D_XOPEN_SOURCE_EXTENDED -otestcurs ../demos/testcurs.c -L/mingw/lib -lncursesw -lpsapi
../demos/testcurs.c: In function 'main':
../demos/testcurs.c:232:29: error: implicit declaration of function 'curses_trace' [-Werror=implicit-function-declaration]
                             curses_trace( flags);
                             ^~~~~~~~~~~~
In file included from ../demos/testcurs.c:33:0:
../demos/testcurs.c: In function 'attrTest':
d:/dev/MinGW/include/ncursesw/curses.h:1301:13: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 #define wattr_set(win,a,p,opts)  (((win) \
                                  ~~~~~~~~~
        ? ((win)->_attrs = ((a) & ~A_COLOR), \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           (win)->_color = (p)) \
           ~~~~~~~~~~~~~~~~~~~~~~
        : OK), \
        ~~~~~^~~
       OK)
       ~~~
d:/dev/MinGW/include/ncursesw/curses.h:1206:26: note: in expansion of macro 'wattr_set'
 #define attr_set(a,c,o)  wattr_set(stdscr,(a),(c),(o))
                          ^~~~~~~~~
../demos/testcurs.c:1558:5: note: in expansion of macro 'attr_set'
     attr_set( WA_TOP, 0, NULL);
     ^~~~~~~~
d:/dev/MinGW/include/ncursesw/curses.h:1301:13: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 #define wattr_set(win,a,p,opts)  (((win) \
                                  ~~~~~~~~~
        ? ((win)->_attrs = ((a) & ~A_COLOR), \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           (win)->_color = (p)) \
           ~~~~~~~~~~~~~~~~~~~~~~
        : OK), \
        ~~~~~^~~
       OK)
       ~~~
d:/dev/MinGW/include/ncursesw/curses.h:1206:26: note: in expansion of macro 'wattr_set'
 #define attr_set(a,c,o)  wattr_set(stdscr,(a),(c),(o))
                          ^~~~~~~~~
../demos/testcurs.c:1561:5: note: in expansion of macro 'attr_set'
     attr_set( WA_DIM, 0, NULL);
     ^~~~~~~~
d:/dev/MinGW/include/ncursesw/curses.h:1301:13: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 #define wattr_set(win,a,p,opts)  (((win) \
                                  ~~~~~~~~~
        ? ((win)->_attrs = ((a) & ~A_COLOR), \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           (win)->_color = (p)) \
           ~~~~~~~~~~~~~~~~~~~~~~
        : OK), \
        ~~~~~^~~
       OK)
       ~~~
d:/dev/MinGW/include/ncursesw/curses.h:1206:26: note: in expansion of macro 'wattr_set'
 #define attr_set(a,c,o)  wattr_set(stdscr,(a),(c),(o))
                          ^~~~~~~~~
../demos/testcurs.c:1565:5: note: in expansion of macro 'attr_set'
     attr_set( WA_ITALIC | WA_UNDERLINE, 0, NULL);
     ^~~~~~~~
d:/dev/MinGW/include/ncursesw/curses.h:1301:13: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 #define wattr_set(win,a,p,opts)  (((win) \
                                  ~~~~~~~~~
        ? ((win)->_attrs = ((a) & ~A_COLOR), \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           (win)->_color = (p)) \
           ~~~~~~~~~~~~~~~~~~~~~~
        : OK), \
        ~~~~~^~~
       OK)
       ~~~
d:/dev/MinGW/include/ncursesw/curses.h:1206:26: note: in expansion of macro 'wattr_set'
 #define attr_set(a,c,o)  wattr_set(stdscr,(a),(c),(o))
                          ^~~~~~~~~
../demos/testcurs.c:1575:5: note: in expansion of macro 'attr_set'
     attr_set( WA_LEFT, 0, NULL);
     ^~~~~~~~
d:/dev/MinGW/include/ncursesw/curses.h:1301:13: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 #define wattr_set(win,a,p,opts)  (((win) \
                                  ~~~~~~~~~
        ? ((win)->_attrs = ((a) & ~A_COLOR), \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           (win)->_color = (p)) \
           ~~~~~~~~~~~~~~~~~~~~~~
        : OK), \
        ~~~~~^~~
       OK)
       ~~~
d:/dev/MinGW/include/ncursesw/curses.h:1206:26: note: in expansion of macro 'wattr_set'
 #define attr_set(a,c,o)  wattr_set(stdscr,(a),(c),(o))
                          ^~~~~~~~~
../demos/testcurs.c:1578:5: note: in expansion of macro 'attr_set'
     attr_set( WA_RIGHT, 0, NULL);
     ^~~~~~~~
cc1.exe: all warnings being treated as errors
make: *** [testcurs] Error 1

we may or may not be able to do something about those.

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