Ask coding questions

← Back to all posts
Compiling C++ repl
atanas (0)

Compiling C++ repl

I wonder whether you can help.

The "+new repl" command and choosing a langauage C++ works just fine.

I read this: "Configuring the run button / .replit" in the Docs section
https://docs.repl.it/repls/dot-replit

Since I wanted to link it to Github I would like to create one and I want it to compile my main.cpp repl. I am creating a .replit file which contains two lines

run="clang++-7 -pthread -std=c++17 -o main main.cpp"
language="cpp"

The run context is just a wild guess. I copied this from the terminal when I am executing the "+new repl" with C++ snippets.

Btw. let's say I am working through the FreeCodeCamp tutorial on C++

https://www.freecodecamp.org/news/the-c-plus-plus-programming-language/