got a couple steps further (see PR comments); now...
# kotlin-native
r
got a couple steps further (see PR comments); now
Copy code
/usr/lib/x86_64-linux-gnu/libtinfo.so: error: undefined reference to 'stat', version 'GLIBC_2.33'
is there a list of system dependencies that need to be installed anywhere?
m
Hi @Reuben F, I have just pushed the newer version. There is also a fix for your problem I have asked in another thread and I use since then. https://github.com/sobotkami/kotlin-native-ncurses
r
great, thank you for following up. i'll try this out next rainy weekend afternoon 🙂
K 1
👍 1
cool, thanks, got it working. (btw you're missing a commit of the gradle folder in your repo, so ./gradlew build errors out). i had to install gcc-multilib on ubuntu to get it to compile. here's my proof of concept code:
Copy code
// based on <https://www.linuxjournal.com/content/programming-text-windows-ncurses>
    val sqWidth = 10
    val sqHeight = 10

    val board = mutableListOf<CPointer<WINDOW>?>()

    fun show() {
        initscr()
        noecho()
        cbreak()
        refresh()

        var starty = 0
        for (i in 0..10) {
            board.add(newwin(sqHeight, sqWidth, starty, i * sqWidth))
        }
        starty = sqHeight
        for (i in 0..10) {
            board.add(newwin(sqHeight, sqWidth, starty, i * sqWidth))
        }
        starty = sqHeight * 2
        for (i in 0..10) {
            board.add(newwin(sqHeight, sqWidth, starty, i * sqWidth))
        }

        for (window in board) {
            if (window == null) {
                println("Window was null!!")
            } else {
                box(window, 0, 0);
                wrefresh(window);
            }
        }

        getch()
    }
m
@Reuben F thanks, I'll push it 🙂