../../ncurses/base/lib_getch.c: No such file or directory.
Hi
Below gives me a seg fault
#include <curses.h>
#include <stdio.h>
int main()
{
char c;
while(1)
{
c = (char)getch( );
printf("you entered %c \n",c);
}
}
[abmisra1@AbhishekM isra1 sampleC]$ gdb terminal.o core
GNU gdb Red Hat Linux (6.3.0.0-1.132. EL4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat- linux-gnu" ...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread _db.so.1" .
Core was generated by `./terminal. o'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libncurses .so.5...done.
Loaded symbols for /usr/lib/libncurses .so.5
Reading symbols from /lib/tls/libc. so.6...done.
Loaded symbols for /lib/tls/libc. so.6
Reading symbols from /lib/ld-linux. so.2...done.
Loaded symbols for /lib/ld-linux. so.2
#0 0x03f66557 in wgetch (win=0x0) at ../../ncurses/ base/lib_ getch.c:467
467 ../../ncurses/ base/lib_ getch.c: No such file or directory.
in ../../ncurses/ base/lib_ getch.c
(gdb) run
Starting program: /home/abmisra1/ sampleC/terminal .o
Program received signal SIGSEGV, Segmentation fault.
0x03f66557 in wgetch (win=0x0) at ../../ncurses/ base/lib_ getch.c:467
467 ../../ncurses/ base/lib_ getch.c: No such file or directory.
in ../../ncurses/ base/lib_ getch.c
(gdb) quit
The program is running. Exit anyway? (y or n) y
[abmisra1@AbhishekM isra1 sampleC]$
I'm using a custom built rhel 4 derived distro
Seems something wrong with my curses library
there is no ncurses/base/ lib_getch. c on my system, I do not think that in any case should a c file be required if we have executables and libraries in place.
Could some one through some light.
|