Sublime Text OpenCV C++ Build System

If you want to compile and run a C++ program using OpenCV in Sublime Text, then copy and paste the code below into a build system file. If you’re not interested in explicitly using C++11 you can delete the “-std=c++0x” section.

"shell_cmd": "g++ -std=c++0x ${file} -o ${file_base_name} `pkg-config --cflags --libs opencv` && ./${file_base_name}"

The following two tabs change content below.
Computational biology PhD candidate at the Australian National University. I love writing (both articles and software), learning more about the world around us, and beekeeping. I also write for

Latest posts by Jack Simpson (see all)

Comments are closed.