bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: undefined reference to `exit_curses'


From: Jeffrey Walton
Subject: Re: undefined reference to `exit_curses'
Date: Sat, 20 Jun 2020 17:34:47 -0400

On Sat, Jun 20, 2020 at 4:42 PM Jeffrey Walton <noloader@gmail.com> wrote:
>
> Hi Everyone/Thomas,
>
> I'm catching this error after upgrading to Ncurses 6.2:
>
> gcc -g2 -O2 -march=native -fPIC -pthread  -o background
> ../obj_s/background.o ../obj_s/dump_window.o
> -L/home/jwalton/tmp/ok2delete/lib -Wl,-R,'$ORIGIN/../lib'
> -Wl,-R,/home/jwalton/tmp/ok2delete/lib -Wl,--enable-new-dtags -I. -I.
> -I../test -DHAVE_CONFIG_H
> -DDATA_DIR=\"/home/jwalton/tmp/ok2delete/share\" -I. -I../include
> -I/home/jwalton/tmp/ok2delete/include -DNDEBUG -D_DEFAULT_SOURCE
> -D_XOPEN_SOURCE=600 -DNDEBUG -g2 -O2 -march=native -fPIC -pthread
> -fPIC  `echo "-L../lib -lform -lmenu -lpanel -lncurses -ltinfo  -ldl
> -lpthread" | sed -e 's/-lform.*-lpanel[^ ]*//'` -lutil  -lm
> ../obj_s/background.o: In function `usage':
> /home/jwalton/Build-Scripts/ncurses-6.2/test/../test/background.c:153:
> undefined reference to `exit_curses'
> ../obj_s/background.o: In function `main':
> /home/jwalton/Build-Scripts/ncurses-6.2/test/../test/background.c:198:
> undefined reference to `exit_curses'
> /home/jwalton/Build-Scripts/ncurses-6.2/test/../test/background.c:240:
> undefined reference to `exit_curses'
> collect2: error: ld returned 1 exit status

The following patch does not help.

--- test/background.c
+++ test/background.c
@@ -35,6 +35,10 @@
 #include <color_name.h>
 #include <dump_window.h>

+#ifdef NO_LEAKS
+extern NCURSES_EXPORT(void) exit_curses (int) GCC_NORETURN;
+#endif
+
 static int default_bg = COLOR_BLACK;
 static int default_fg = COLOR_WHITE;

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]