On Nov 5 20:30, Andrey Repin wrote: > Greetings, Daniel Goldman! > > > # Found /usr/x86_64-pc-cygwin/sys-root/usr/lib/libncurses.a > > # Will this let me compile for dos window? Apparently not. > > $ i686-pc-mingw32-gcc \ ^^^^ So you're building for 32 bit mingw > > -I /usr/x86_64-pc-cygwin/sys-root/usr/include/ ^^^^^^^^^^^^^^^^ Pointing the compiler to header files for a Cygwin build, which is a *different* target (i686 vs. x86_64 *and* mingw vs. cygwin)... > > ncurses.c -L /usr/x86_64-pc-cygwin/sys-root/usr/lib/ -lncurses ^^^^^^^^^^^^^^^^ same here > > ... undefined reference to `initscr' > > ... more "undefined reference" error messages ...and that's logical result. Along the same lines you could try to link powerpc-linux ncurses against arm-freebsd binary. That just won't work. What you need is a i686-mingw ncurses. Have a look around on the net or try to build your own. However, it will probably not work correctly in a Cygwin pseudo tty due to lack of the Cygwin compat layer implementing them. > > ------------------------------------------------------------ > > > My questions: > > > 1) Did I make a compile-line syntax error? Is there a variation of the > > i686-pc-mingw32-gcc command line so I can use cygwin to compile > > ncurses.c to run in dos window, independent of cygwin? > > I'm no expert, but my first answer would be "yes". > You shouldn't use cross-compilers directly, rather, use appropriate GCC > switches to specify host and target subsystems. Nope, use cross compilers. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat