They've done it, everyone. You can now use ncurses on replit via the shell.
The repl.it team made some changes to the compiler this morning. You can now compile via clang if you use the shell (accessible via the command palette.) Now you can make and run an ncurses program in just three easy steps! (steps shown are for c++)
- #include <ncurses.h>
- enter "clang -std=c++11 -lncurses main.cpp -o main" into the shell to compile
- enter "/home/runner/main" into the shell to run
note: this will run the program in the shell window instead of the normal run window, so keep that in mind. Also, I'm not sure if this works with repl.run yet. Also Also, you can just do step#3 to run your program again w/o applying any changes to the source.
Major props to the repl.it fellows for this one.
There should be some configution functionality to add libraries.
clang++-7 -pthread -std=c++11 -o main main.cpp /tmp/main-6026d9.o: In function `main': main.cpp:(.text+0x10): undefined reference to `initscr' main.cpp:(.text+0x19): undefined reference to `cbreak' main.cpp:(.text+0x21): undefined reference to `noecho' main.cpp:(.text+0x40): undefined reference to `stdscr' main.cpp:(.text+0x45): undefined reference to `wgetch' main.cpp:(.text+0x74): undefined reference to `refresh' clang: error: linker command failed with exit code 1 (use -v to see invocation) compiler exit status 1