Ask coding questions

← Back to all posts
(@ replit staff) with certain compilation options
SPQR (533)

How would I run my program (which is dependent on ncurses) with the -lncurses flag in I can do it in the shell on fine, but it works much better in, 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 (733) [earned 5 cycles]
View Answer
Scoder12 (733)

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

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

SPQR (533)

@Scoder12 Alright thanks, I'll try that now

SPQR (533)

@Scoder12 Update: It took 9 hours but I got it working with polygott (test program )

amasad (2525)

Interesting idea cc @basicer

What are you building?

SPQR (533)

@amasad I'm remaking my pseudographics engine ( 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 ( 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:
May not look like much, but it has a bunch of special compilation options that it couldn't have had otherwise.

SPQR (533)

@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 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 (533)

@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.