Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Charles Wilson
Dave Korn wrote: > Right; but seeing as he /didn't/ add -ltinfo, he would have ended up with > exactly the error we saw, wouldn't he? No, because the headers that came with 5.7-2 had macros that turned his code 'curscr' into 'ncwrap_curscr()'. In the briefly released 5.7-1 the macros turned 'c

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Dave Korn
Charles Wilson wrote: > Dave Korn wrote: >> Charles Wilson wrote: >>> Nah. That scenario might cause a run-time failure, but not a link-time >>> failure like the one Alexey described. >> He'd end up with the old DLL but the /new/ import library, wouldn't he? So >> adding -ltinfo might fix the l

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Charles Wilson
Dave Korn wrote: > Charles Wilson wrote: >> Nah. That scenario might cause a run-time failure, but not a link-time >> failure like the one Alexey described. > > He'd end up with the old DLL but the /new/ import library, wouldn't he? So > adding -ltinfo might fix the link, but then it would fai

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Dave Korn
Charles Wilson wrote: > Dave Korn wrote: >> Charles Wilson wrote: >>> Alexey Lyubimov wrote: > $ gcc -otnc -g -Wl,--enable-auto-import tnc.c -lncurses /cygdrive/c/windows/temp/ccUqygVy.o: In function `main': /cygdrive/e/home/ael/work/ncurses/tnc.c:15: undefined reference to `_

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Charles Wilson
Dave Korn wrote: > Charles Wilson wrote: >> Alexey Lyubimov wrote: >>> $ gcc -otnc -g -Wl,--enable-auto-import tnc.c -lncurses >>> /cygdrive/c/windows/temp/ccUqygVy.o: In function `main': >>> /cygdrive/e/home/ael/work/ncurses/tnc.c:15: undefined reference to `_stdscr' >>> collect2: ld returned 1 e

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Dave Korn
Charles Wilson wrote: > Alexey Lyubimov wrote: >> Unfortunately, things went worse :-( >> After I've upgraded to GCC 3.4.4-999 and libncurses9-5.7-2 I get the >> following error instead of a ld's warning (see my first message in this >> thread for the reference): >> >> $ gcc -otnc -g -Wl,--enable

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Charles Wilson
Alexey Lyubimov wrote: > Unfortunately, things went worse :-( > After I've upgraded to GCC 3.4.4-999 and libncurses9-5.7-2 I get the > following error instead of a ld's warning (see my first message in this > thread for the reference): > > $ gcc -otnc -g -Wl,--enable-auto-import tnc.c -lncurses

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Alexey Lyubimov
Thanks again, Dave! I've updated again too, and now ncurses 5.7-3 works for me also! :-) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: ht

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Dave Korn
Alexey Lyubimov wrote: > $ gcc -otnc -g -Wl,--enable-auto-import tnc.c -lncurses > /cygdrive/c/windows/temp/ccUqygVy.o: In function `main': > /cygdrive/e/home/ael/work/ncurses/tnc.c:15: undefined reference to > `_stdscr' collect2: ld returned 1 exit status > > "-Wl,--enable-auto-import" works f

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Dave Korn
Alexey Lyubimov wrote: > Unfortunately, things went worse :-( After I've upgraded to GCC 3.4.4-999 > and libncurses9-5.7-2 I get the following error instead of a ld's warning > (see my first message in this thread for the reference): > > $ gcc -otnc -g -Wl,--enable-auto-import tnc.c -lncurses > /

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-03-03 Thread Alexey Lyubimov
Unfortunately, things went worse :-( After I've upgraded to GCC 3.4.4-999 and libncurses9-5.7-2 I get the following error instead of a ld's warning (see my first message in this thread for the reference): $ gcc -otnc -g -Wl,--enable-auto-import tnc.c -lncurses /cygdrive/c/windows/temp/ccUqygVy.o

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-02-27 Thread Dave Korn
Vincent R. wrote: > Dave, > > how can you answer to so many people on so different topics and on so > different ML. > Are you human ;-) ? It's just the spirit of the age ... cheers, DaveK -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-02-27 Thread Vincent R.
On Fri, 27 Feb 2009 15:59:13 +, Dave Korn wrote: > Alexey Lyubimov wrote: > >> 1. Why did initscr() and endwin() not require --enable-auto-import >> option, >> but refresh() does? > > It's because the initscr() and endwin() functions don't refer to the > _stdscr > variable internally, so

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-02-27 Thread Dave Korn
Alexey Lyubimov wrote: > 1. Why did initscr() and endwin() not require --enable-auto-import option, > but refresh() does? It's because the initscr() and endwin() functions don't refer to the _stdscr variable internally, so they don't trigger the linker to import anything from the ncurses DLL; i

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-02-27 Thread Greg Chicares
[Reformatted--please see: http://www.cygwin.com/acronyms/#PCYMTWLL Thanks.] On 2009-02-27 15:10Z, Alexey Lyubimov wrote: > > 2. Can you point me to the right place in the documentation > (Cygwins's, gcc's, ld's or I don't know whose :)) where > auto-import is explained in not very complicated m

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-02-27 Thread Alexey Lyubimov
Thanks a lot, Dave! Your advices helped! But, can I ask you two more questions: 1. Why did initscr() and endwin() not require --enable-auto-import option, but refresh() does? 2. Can you point me to the right place in the documentation (Cygwins's, gcc's, ld's or I don't know whose :)) where auto

Re: 1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-02-27 Thread Dave Korn
Alexey Lyubimov wrote: > Hello, I decided to learn HOWTO write applications with ncurses library, > but my attempt failed during linking step (seems to me, that for some > reason ld did not find stdscr). Not quite. It found it, but wasn't prepared for /where/ it found it. > $ gcc -otnc -g tnc.

1.5.25-15: First steps with ncurses programming: can NOT build Hello_world app

2009-02-27 Thread Alexey Lyubimov
Hello, I decided to learn HOWTO write applications with ncurses library, but my attempt failed during linking step (seems to me, that for some reason ld did not find stdscr). OS: Win98SE Source (tnc.c): #include /* -lncurses */ int main(int arg