Home > Software design >  What cross platform C console engine?
What cross platform C console engine?

Time:05-15

I am now working on a small C project on console. I hope that it can run on Windows, Mac OS, Linux consoles. However, I found that ncurses isn't available on Windows while PDcurses isn't available for Windows.

So is there any console library that supports both Windows and Unix? Or how can I compile ncurses projects for windows?

CodePudding user response:

ncurses and PDCurses are both implementations of the curses standard. They are mostly compatible. Just write to the standard (and don't dip into the terminfo-level stuff), and you should be fine. If necessary, you can #ifdef small sections of code to deal separately with each library. You don't need the exact same curses library running on all platforms, any more than you need the same C compiler or standard library.

  • Related