Skip to content

martinstarkov/opencv-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linux:

sudo apt install build-essential cmake gcc libopencv-dev
mkdir build
cd build
cmake ..
cmake --build .

Windows MSVC:

Download and install the following dependencies:

Navigate to where you have cloned this repository. Open a terminal and enter the following commands in order.

mkdir build
cd build
cmake .. -DOpenCV_DIR="<path/where/you/extracted/opencv/build/x64/vc16/lib>"

Note: DOpenCV_DIR is case-sensitive.

Once the commands finish executing, you should be able to find a MSVC solution (.sln) file in the build directory (i.e. /path/to/this-repository-name/build). Open the solution file and run the program via the green "Local Windows Debugger" button at the top.

When "Debug" is chosen in the configuration dropdown, OpenCV will output some error messages in the console but they can be ignored and do not appear if the configuration is switched to "Release"

If you add new files to the project, ensure you rerun: (terminal inside the build directory)

cmake .. -DOpenCV_DIR="<path/where/you/extracted/opencv/build/x64/vc16/lib>"

This will regenerate all the necessary project files to recognize the newly added file.

Windows MSYS

Download and install the following dependencies:

Navigate to where you have cloned this repository. Open a terminal and enter the following commands in order.

mkdir build
cd build
cmake .. -DOpenCV_DIR="<path/where/you/extracted/opencv/build/x64/mingw/lib>"
ninja

Note: DOpenCV_DIR is case-sensitive.

The built executable should be placed into the build directory.

If you make changes or add new files to the project, ensure you rerun: (terminal inside the build directory)

ninja

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published