public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* compile ncurses "hello world" to run independent of cygwin?
@ 2015-11-02  3:04 Daniel Goldman
  2015-11-02  4:09 ` Darik Horn
  2015-11-02 12:42 ` cyg Simple
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Goldman @ 2015-11-02  3:04 UTC (permalink / raw)
  To: cygwin

I have a Windows 7 / 64 bit PC.

I just installed 32 bit cygwin to d:\cygin\. Installed everything.
https://cygwin.com/faq.html#faq.setup.everything

I started up the Cygwin Terminal.

$ echo $PATH
/usr/local/bin:/usr/bin:/cygdrive/c/Program Files/Common Files/Microsoft 
Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common 
Files/Microsoft Shared/Windows 
Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program 
Files (x86)/Intel/OpenCL SDK/3.0/bin/x86:/cygdrive/c/Program Files 
(x86)/Intel/OpenCL SDK/3.0/bin/x64:/cygdrive/d/Program Files 
(x86)/Putty:/cygdrive/c/Program Files (x86)/Windows 
Live/Shared:/cygdrive/d/msys64/usr/bin:/usr/lib/lapack:/usr/openwin/bin

$ cat ncurses-1.c
// http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/helloworld.html

#include <curses.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;
  }

$ gcc ncurses-1.c -lncurses

$ ./a.exe # runs perfectly under cygwin

$ i686-pc-mingw32-gcc -I /usr/include ncurses-1.c -L /lib -lncurses

$ ./a.exe
Segmentation fault

Switching to a windows 7 command window (dos window), and running a.exe, 
I get an error message:

"the program can't start because cygncursesw-10.dll is missing..."

What am I doing wrong? How do I use cygwin to compile the test ncurses 
program so it can run in a dos terminal, independent of cygwin? I looked 
around the docs and archives and could not figure out.

Thanks,
Daniel

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-02 15:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02  3:04 compile ncurses "hello world" to run independent of cygwin? Daniel Goldman
2015-11-02  4:09 ` Darik Horn
2015-11-02 12:48   ` cyg Simple
2015-11-02 15:14     ` Greg Freemyer
2015-11-02 15:34       ` Darik Horn
2015-11-02 15:49       ` Corinna Vinschen
2015-11-02 12:42 ` cyg Simple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).