how to compile opencv c++ in ubuntu
C++
1 #!/bin/bash
2 echo "compiling $1"
3 if [[ $1 == *.c ]]
4 then
5 gcc -ggdb `pkg-config --cflags opencv` -o `basename $1 .c` $1 `pkg-config --libs opencv`;
6 elif [[ $1 == *.cpp ]]
7 then
8 g++ -ggdb `pkg-config --cflags opencv` -o `basename $1 .cpp` $1 `pkg-config --libs opencv`;
9 else
10 echo "Please compile only .c or .cpp files"
11 fi
12 echo "Output file => ${1%.*}"
1 $ alias opencv="~/.compile_opencv.sh"
2 $ opencv opencvtest.c
3 $ ./opencvtest
Also in C++:
- Title
- c++ code for polynomial addition
- Category
- C++
- Title
- ceil c++;
- Category
- C++
- Title
- c++ multiple inheritance diamond problem
- Category
- C++
- Title
- how to initialize a vector in c++
- Category
- C++
- Title
- c++ try
- Category
- C++
- Title
- 2927260.eps 2927262.jpg 2927263.ai License free.txt License premium.txt
- Category
- C++
- Title
- c++ files
- Category
- C++
- Title
- shortest path with bfs in c++
- Category
- C++
- Title
- how to create object in c++
- Category
- C++
- Title
- translate
- Category
- C++
- Title
- c++ vector lower_bound index
- Category
- C++
- Title
- how use global variables instead of local in c++
- Category
- C++
- Title
- declare vectors c++
- Category
- C++
- Title
- maximum subarray sum equal with K in c++
- Category
- C++
- Title
- opencv compile c++
- Category
- C++
- Title
- c++ movment
- Category
- C++
- Title
- what is time complexity of insertion sort
- Category
- C++
- Title
- reverse in vector c++
- Category
- C++
- Title
- c++ max of array
- Category
- C++
- Title
- variabvles in c++
- Category
- C++
- Title
- delete a double pointer c++
- Category
- C++
- Title
- c++ loop through int array
- Category
- C++
- Title
- c++ functions
- Category
- C++
- Title
- map arduino
- Category
- C++
- Title
- ue4 c++ struct
- Category
- C++
- Title
- elseif c++
- Category
- C++
- Title
- c++ char print align
- Category
- C++
- Title
- getting a random letter in c++
- Category
- C++
- Title
- basic data types in c++ hackerrank solution
- Category
- C++
- Title
- preorder traversal c++
- Category
- C++
- Title
- lambda operator in c++
- Category
- C++
- Title
- trovare il valore massimo in un array c++ w3
- Category
- C++
- Title
- convert int to binary string c++
- Category
- C++
- Title
- how to print 5 precision float in c++
- Category
- C++
- Title
- log base 10 c+_+
- Category
- C++
- Title
- switch c++
- Category
- C++
- Title
- initialize int c++
- Category
- C++
- Title
- C++ and endl
- Category
- C++
- Title
- c++ yes no question
- Category
- C++
- Title
- c++ random
- Category
- C++
- Title
- c++ argv
- Category
- C++
- Title
- inconsequential meaning
- Category
- C++
- Title
- type id c++
- Category
- C++
- Title
- how to get os name in c++
- Category
- C++
- Title
- how to append one vector to another c++
- Category
- C++
- Title
- c++ unittest in ros
- Category
- C++
- Title
- what does count function do in hashmap
- Category
- C++
- Title
- stringstream in c++ with delimiter
- Category
- C++
- Title
- c++ give options
- Category
- C++
- Title
- select elements from array C++
- Category
- C++
- Title
- differentialble programming
- Category
- C++
- Title
- class is replace by structure
- Category
- C++
- Title
- substr in c++
- Category
- C++
- Title
- error: redefinition of ‘class Customer’
- Category
- C++
- Title
- how to avoid tle in c++
- Category
- C++
- Title
- insertion sort in c++ program
- Category
- C++
- Title
- cpp nan value
- Category
- C++
- Title
- c++ function to find length of array
- Category
- C++
- Title
- how to iterate through a map in c++
- Category
- C++
- Title
- log base e synthax c++
- Category
- C++
- Title
- count function c++
- Category
- C++
- Title
- getch c++ library
- Category
- C++
- Title
- zeros of array c++
- Category
- C++
- Title
- how to make string get spaces c++
- Category
- C++
- Title
- c++ loop through array
- Category
- C++
- Title
- expected initializer before 'isdigit'|
- Category
- C++
- Title
- how to output to console c++
- Category
- C++
- Title
- C++ int to char*
- Category
- C++
- Title
- check if key exists in map c++
- Category
- C++
- Title
- how to remove maximum number of characters in c++ cin,ignore
- Category
- C++
- Title
- c++ class inheritance
- Category
- C++
- Title
- convert decimal to binary in c++
- Category
- C++
- Title
- maximum possible number atmost k swaps
- Category
- C++
- Title
- single line if c++
- Category
- C++
- Title
- array<string, 7> c++
- Category
- C++
- Title
- creare array con c++
- Category
- C++
- Title
- restting a queue stl
- Category
- C++
- Title
- c++ looping through a vector
- Category
- C++
- Title
- runtime error in c++
- Category
- C++
- Title
- set mimetype validation in mongoose
- Category
- C++
- Title
- c++ vector iterator
- Category
- C++
- Title
- find in vector in c++
- Category
- C++
- Title
- Get handle in C++
- Category
- C++
- Title
- modulo c++
- Category
- C++
- Title
- registering a new QML type
- Category
- C++
- Title
- set precision in c++
- Category
- C++
- Title
- minmax_element c++
- Category
- C++
- Title
- min heap priority queue c++
- Category
- C++
- Title
- decimal to hex cpp
- Category
- C++
- Title
- remove element by index from vector c++
- Category
- C++
- Title
- c++ allocate dynamic with initial values
- Category
- C++
- Title
- statement that causes a function to end in c++
- Category
- C++
- Title
- length of array in cpp
- Category
- C++
- Title
- pionter in c++
- Category
- C++
- Title
- least number of coins to form a sum
- Category
- C++
- Title
- constant variables in c++
- Category
- C++
- Title
- stl sort in c++
- Category
- C++
- Title
- initialize 3d vector c++
- Category
- C++
- Title
- c++ create array
- Category
- C++
- Title
- c++ read matttrix from text file
- Category
- C++