Created
February 2, 2017 12:36
-
-
Save siddharthdeore/c183ebb98f34d556f9db620b29dc0307 to your computer and use it in GitHub Desktop.
Compile and run all available OpenCV return C++ and C source code in current directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| if [ $# -gt 0 ] ; then | |
| base=`basename $1 .c` | |
| echo "compiling $base" | |
| gcc -ggdb `pkg-config opencv --cflags --libs` $base.c -o $base | |
| else | |
| for i in *.cpp; do | |
| echo "compiling $i" | |
| g++ -ggdb `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv`; | |
| ./`basename $i .cpp` | |
| done | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment