Ask coding questions

← Back to all posts
(@ replit staff) repl.run with certain compilation options
h
SPQR (453)

How would I run my program https://repl.it/@SPQR/Curses-Test (which is dependent on ncurses) with the -lncurses flag in repl.run? I can do it in the shell on repl.it fine, but it works much better in repl.run, and I want to be able to send a link to the game to people without needing them to actually manually compile and run the game via the shell. Thanks.

Answered by Scoder12 (348) [earned 5 cycles]
View Answer
Commentshotnewtop
Scoder12 (348)

You could make a bash repl which runs the command for your code and use the repl.run link for that. If that doesn't work you might have to use polygott but that's pretty advanced.

I'm a repl.it helper. If this is a good answer, please upvote!

SPQR (453)

@Scoder12 Alright thanks, I'll try that now

SPQR (453)

@Scoder12 Update: It took 9 hours but I got it working with polygott (test program https://repl.it/@SPQR/Hrm )

amasad (1742)

Interesting idea cc @basicer

What are you building?

SPQR (453)

@amasad I'm remaking my pseudographics engine (https://repl.it/@SPQR/Scipios-Pseudographics-Game-Engine-v07-beta) using ncurses. I'm planning on making the ncurses version the main version as soon as I get it up to speed. Since making this post, I've made a polygott repl that does what I need it to (https://repl.it/@SPQR/Pseudographics-Game-Engine-ncurses-edition). Obviously I haven't gotten very far, but I haven't had much of a chance to work with ncurses. It's always just been this miraculous "what if this worked" library. Until a couple days ago, that is.
I had to write a script in a language I don't know (bash) but I got it working with polygott by having the Makefile run a main.bash file which compiles and runs my main.cpp file (and all attached files.)
The end result: https://pseudographics-game-engine-ncurses-edition.spqr.repl.run/
May not look like much, but it has a bunch of special compilation options that it couldn't have had otherwise.

SPQR (453)

@amasad Side note: I'd recommend you make an announcement of some kind that brings to attention the software's capability, because I wouldn't have known that replit could do this stuff unless I'd been fiddling around with the shell. I also think that it could be beneficial to maybe make it a little more clear what exactly polygott is (because I still don't really know.)
But anyways I don't think the average user really knows what repl.it is capable of. I remember Tim saying a few months ago that you guys would be implementing a new console that would work with ncurses and others, and it would seem that you already have, but I kind of had to draw that conclusion for myself.
Basically I just think that you should make an announcement that basically says "Look, you can do all these cool things with polygott / bash, and here's some examples" and maybe make some example programs or something. This is just my thoughts, though. Take it how you like.

SPQR (453)

@amasad I know this is way more information than you asked for, so sorry for the flood :P
Also, I'm going to make a post in #share about this in the meantime. Unless you don't want me to.