I don’t know why I have 2 lots of libncurses installed, the packages came when I installed the system.
Here is the small program I want to compile as a test of ncurses working:
#include <ncurses.h>
int main()
{
initscr(); // Start curses mode
printw(“Hello World !!!”); // Print Hello World
refresh(); // Print it on to the real screen
getch(); // Wait for user input
endwin(); // End curses mode
return 0;
}
Here are the errors:
/usr/lib/gcc/i586-suse-linux/4.7/…/…/…/…/i586-suse-linux/bin/ld: /lib/libncurses.so.5: undefined reference to symbol ‘stdscr’
/usr/lib/gcc/i586-suse-linux/4.7/…/…/…/…/i586-suse-linux/bin/ld: note: ‘stdscr’ is defined in DSO /usr/lib/gcc/i586-suse-linux/4.7/…/…/…/libtinfo.so so try adding it to the linker command line
/usr/lib/gcc/i586-suse-linux/4.7/…/…/…/libtinfo.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Any ideas, this stuff normally just works? Thanks for any help.
> Here are the ncurses packages I have installed:
>
> yast2-ncurses-pkg-2.22.7-2.1.2.i586
> libncurses5-5.9-12.5.1.i586 <— 1
> ncurses-utils-5.9-12.5.1.i586
> ncurses-devel-5.9-12.5.1.i586
> libncurses6-5.9-12.5.1.i586 <— 2?
> yast2-ncurses-2.22.4-1.1.2.i586
please tell us how you came up with that list? (from a terminal command,
maybe? if so, instead of typing a story, show us the terminal output and input, from prompt, command, to output and next prompt…and,
copy/paste it all back to this thread using the instructions here: http://goo.gl/i3wnr
and, then please notice that we have a programming forum and you should
be using it (that is one place you can expect the programming gurus to
hang out–they may be in Applications also, but.)…so, please press
the “Report” button on this post and ask a moderator to move this thread
to http://tinyurl.com/5v695w4
Here is the small program I want to compile as a test of ncurses working:
#include <ncurses.h>
int main()
{
initscr(); // Start curses mode
printw("Hello World !!!"); // Print Hello World
refresh(); // Print it on to the real screen
getch(); // Wait for user input
endwin(); // End curses mode
return 0;
}
Here are the errors:
/usr/lib/gcc/i586-suse-linux/4.7/…/…/…/…/i586-suse-linux/bin/ld: /lib/libncurses.so.5: undefined reference to symbol ‘stdscr’
/usr/lib/gcc/i586-suse-linux/4.7/…/…/…/…/i586-suse-linux/bin/ld: note: ‘stdscr’ is defined in DSO /usr/lib/gcc/i586-suse-linux/4.7/…/…/…/libtinfo.so so try adding it to the linker command line
/usr/lib/gcc/i586-suse-linux/4.7/…/…/…/libtinfo.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Any ideas, this stuff normally just works? Thanks for any help.
People suggested you to ask for your thread moved to the Progrtamming/Scripting forum. You did not.
Instead you doubleposted. This will most probably create a mess because now people are going to answer either here or there without knowing what others already posted.
I am on 64-bit. So I tested compiling it as a 32-bit executable and it works as well. So I do not know what is wrong. Perhaps reinstall the ncurses and gcc packages? Also you might want to make sure the entire base development pattern is installed.
On 12/13/2012 08:26 PM, hcvv wrote:
> As asked, please show prompt, command, output and next prompt. Then you
> do not have to tell a story on how you did it.
heh…now that i spend the extra seconds needed to look carefully at
what was posted the first time, i see
and, had i first noted earlier a five became a six, i would not have
wondered what was wrong with his list and asked for a prompt to prompt
paste back…in order to try to solve that riddle.
sorry.
next: the OP speaks of compiling and i think someone needs to look at
the command line entries there also, as well as actual output, prompt to
prompt.