Ask coding questions

← Back to all posts
compiler flags?
ananelson

Hi!

I'm trying to build a C++ example which requires ncurses. I can compile and run by manually adding -lncurses to the compile command, but I'm wondering if there's a way to set default compiler flags which stick with a repl and get applied automatically.

Answered by SixBeeps [earned 5 cycles]
View Answer
Comments
hotnewtop
CodeLongAndPros

You should use a Makefile, and put this in a file named ".replit"

Where run is a makefile target.

SixBeeps
ananelson

This is perfect, thank you!

Highwayman

@CodeLongAndPros @SixBeeps @ananelson ya’ll realize there’s an actual repl for makefiles, right? https://repl.it/languages/polygott

SixBeeps

@Highwayman I thought that was long lost what the heck

Highwayman
CodeLongAndPros

@Highwayman Well, I was thinking about a C++ repl

Highwayman

@CodeLongAndPros oh alright.