So I'm trying to use the Ncurses library in swift on linux and it hangs forever when I call the
initscr() method. I'm not really sure how to debug this and I'm pretty sure I've set up the C module map stuff correctly.
You can see the Ncurses module I created here.
I wanted to include the macros and constants that swift can't automatically import, so I use
@_exported CNCurses and set up all the macros/constants that I could find in the Linux Ncurses headers that didn't automatically get imported into swift. That way I can just
import NCurses and use it just like I would in C, but in swift.
EDIT: Adding example snippet that hangs on my Ubuntu 18.04 machine using Swift 5.0.1
import NCurses initscr() // Hangs here forever var xSize: CInt = 0 var ySize: CInt = 0 getmaxyx(stdscr, &ySize, &xSize) print("Width: \(xSize), Height: \(ySize)")