opencv-config(1)

opencv-config1

Script to get information about the installed version of opencv

Usage

opencv-config [--prefix DIR] [--version] [--libs [<extensions>]] [{--cflags | --cxxflags}]

Overview

opencv-config is a tool that is used to configure and determine the compiler and linker flags that should be used to compile and link progams, libraries, and plugins that use OpenCV.

Options

--cflags

Print the C compiler flags that are necessary to compile a program or library that uses OpenCV.

--cxxflags

Print the C++ compiler flags that are necessary to compile a program or library that uses OpenCV.

--libs [<extensions>]

Print the linker flags that are necessary to link a program that uses libcv. Optionally, add linker flags for the libhighgui, libcvcam and/or libcvaux OpenCV extensions by appending highgui, cvcam and/or cvaux.

--prefix=DIR

If specified, use PREFIX instead of the installation prefix that libcv was built with when computing the output for the --cflags, --cxxflags and --libs options. This option must be specified before any of the --cflags, --cxxflags and --libs options.

--version

Prints the currently installed version of libcv on standard output.

Examples

gcc -o main.o $(opencv-config --cflags) -c main.c

is how you might use opencv-config to compile a C source file for an executable program.

gcc -o my_app $(opencv-config --libs) main.o util.o

is how you might use opencv-config to link compiled objects into an executable program.

Releases

2 releases since Debian 3.1 (Sarge); the text changed 1 time.

  1. 3.1
  2. 4.0

Author

This manual page was written for sdl-config by Branden Robinson, originally for Progeny Linux Systems, Inc., and the Debian Project. It was adapted to libcv by Sam Hocevar.

From libcv-dev 0.9.7-4 in Debian 4.0 (Etch). Parsed by carta from the page's man source.