Skip to content

Instantly share code, notes, and snippets.

@sudoankit
Last active May 30, 2017 12:40
Show Gist options
  • Save sudoankit/c5ed0ba8698df3c73100bac99cc32245 to your computer and use it in GitHub Desktop.
Save sudoankit/c5ed0ba8698df3c73100bac99cc32245 to your computer and use it in GitHub Desktop.
Shell script to compile OpenCV programs.
g++ `pkg-config --cflags --libs opencv` $1 -o $2 `pkg-config --cflags --libs opencv`
# $1 = yourprogram.cpp
# $2 = executable output name; yourprogram
# save the file in your directory
# $chmod +x cv-compile.sh
# $sh cv-compile $1 $2
# Caveats
# OpenCV 3.2-dev @ Ubuntu 16.04 LTS, with CUDA 8 support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment