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
And enjoy!
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.
abc3354
Cool !
There should be some configution functionality to add libraries.
@tomekjaworski Are you just clicking "run"? because that won't work, you have to paste
clang -std=c++11 -lncurses main.cpp -o main
into the shell, and then/home/runner/main
to run, for this particular program at least.@SPQR Yes, I;m using the shell command line. However I was wandering is there a config entry in which I can specify compiler parameters (like list of libs to link)?
@tomekjaworski not as of right now, unless you use polygott, which uses makefile syntax
@tomekjaworski make a file called .replit in the root directory and put this in it: run=""
@beaver700nh I meant home directory not root
i am also getting the same error. it also says /home/runner/main directory is not found when I try to run it
@SPQR