newsboat / stfl

stfl with Newsboat-related bugfixes
GNU Lesser General Public License v3.0
7 stars 3 forks source link

complie error #6

Closed akahanaton closed 1 year ago

akahanaton commented 1 year ago

Hi, I was trying to compile stfl on a mac system, but encounter this error, do you have any hint to fix it, many thanks.


base.c:537:11: error: implicit declaration of function 'wget_wch' is invalid in C99 [-Werror,-Wimplicit-function-declaration]                                                                                                                                         
        int rc = wget_wch(stdscr, &wch);                                                                                                                                                                                                                              
                 ^                                                                                                                                                                                                                                                    
base.c:537:11: note: did you mean 'wgetch'?

/usr/local/opt/ncurses/include/ncursesw/curses.h:852:28: note: 'wgetch' declared here                                              
extern NCURSES_EXPORT(int) wgetch (WINDOW *);                           /* implemented */                                                                                                                                                                       
                           ^

base.c:736:4: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]    
                        mvwaddnwstr(win, y, x, p, len);                                                                            
                        ^                                                                                                          
base.c:736:4: note: did you mean 'mvwaddnstr'?         
/usr/local/opt/ncurses/include/ncursesw/curses.h:720:28: note: 'mvwaddnstr' declared here                                                     
extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int);  /* generated */                                               
                           ^                                           
base.c:744:4: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]               
                        mvwaddnwstr(win, y, x, p, len);                
                        ^                                              
3 errors generated.                                                    
make: *** [base.o] Error 1```
akahanaton commented 1 year ago

Adding -D_XOPEN_SOURCE=600 to CFLAGS solved my problem.