Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirection is not support. #52

Closed
andrey-perevitskiy opened this issue Feb 15, 2019 · 2 comments
Closed

Redirection is not support. #52

andrey-perevitskiy opened this issue Feb 15, 2019 · 2 comments

Comments

@andrey-perevitskiy
Copy link

andrey-perevitskiy commented Feb 15, 2019

I clone your repo and built pdcurses in ../wincon.
I got pdcurses.a. Ok. Next, I decided write simple test program and compile it:

main.c:

#include <stdio.h>

#include <curses.h>

int
main(void) {
    initscr();
    printw("Hello, World!\n");
    refresh();
    endwin();
    return 0;
}

How I compiled it: gcc -I ~/source/PDCurses/ main.o ~/source/PDCurses/wincon/pdcurses.a -o prog

It's good. Next, I run ./prog.exe and see an error: Redirection is not supported.

I searching solution this problem, but i found only for nano text editor (it's run perfectly for me), because i'm writing here.

I'm using cygwin in windows.

@Bill-Gray
Copy link
Contributor

This has come up several times. (Sufficiently often that I'm now thinking perhaps the error message should perhaps be more informative.) There's some good discussion of the problem at
Bill-Gray/PDCursesMod#15
Essentially, mintty doesn't support the Windows console API; it uses more "traditional" escape sequences, a la VT-xxx and xterm. So there's no way to get the WinCon flavor of PDCurses to work in mintty. You can use SDL, or (in my fork) the VT or Windows GUI flavors. The VT flavor would be the way to go if you're insistent on the display being within the console, rather than as a separate window.

@wmcbrine
Copy link
Owner

There are some options for running wincon with Cygwin --

  1. Start any PDCurses-linked app from mintty as "cmd /c start progname" instead of just "./progname". This will launch a standard Windows console in a new window and run the app there.

  2. Open a regular "cmd" console window instead of mintty, go to the Cygwin directory, and run cygwin.bat. This creates a Cygwin environment within a standard console window, so you can run "./progname" directly. Recent versions of the Windows console have gained a lot of support for escape sequences, so this may not even be a problem for Cygwin's more Unix-y apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants