Last Updated: February 25, 2016
·
625
· icholy

C++: make repl

I recently started adding a repl: rule to all my makefiles and it has changed the way I program.

I'm using cling to do it.
Here's how I compiled it on osx (it takes a while)

init_repl.cpp

#include <something>
#include <something_else>

Makefile

repl:
    cling -std=c++11 -linit_repl.cpp -llibfoo.so

Then it's just a matter of running make repl