GithubHelp home page GithubHelp logo

install-cmake-make-gcc-opencv-on-windows's Introduction

Install make, g++, CMake and OpenCV on Windows

Installing g++ and make

  1. Download the installer from here MSYS2
  2. Follow the steps mentioned in the link above
  3. After installating, in the Windows search bar, type 'settings' to open your Windows Settings.
  4. Search for Edit environment variables for your account.
  5. Choose the Path variable and then select Edit, click new and paste C:\msys64\mingw64\bin if the installation is done at the default location.
  6. Again click new and paste C:\msys64\usr\bin which is the path for make.exe
  7. Select OK to save the updated PATH. You will need to reopen any console windows for the new PATH location to be available.

Installing CMake

  1. Install from Binary distributions from here CMake
  2. Run the installer.
  3. When asked for, select “Add CMake to the system PATH for all users”.
  4. Complete the installation.
  5. Reopen any console windows for the new PATH location to be available.

Installing OpenCV

OpenCV by default provides binaries to compile with visual studio which is available for download here

  1. Download OpenCV for windows from above link by downloading opencv-4.5.3-vc14_vc15.exe from the link above and extract it in C:\opencv

Installing OpenCV from source to compile with MinGW on Windows

  1. Next download the source code (zip) from the same above link and extract in desired folder
  2. Inside the opencv-4.5.3 folder create a new folder named build.
  3. In command prompt navigate to the above directory and type cmake -G "MSYS Makefiles" ..
  4. Next type mingw32-make install. This will take time to complete.
  5. Once it has completed navigate to C:\opencv-4.5.3\build\install\x64 and copy the folder mingw and paste it in the directory C:\opencv\build\x64 where you can see vc14 and vc15 folders.
  6. Now add C:\opencv\build\x64 and C:\opencv\build\x64 to PATH by following the steps mentioned in the installation process for g++ and make
  7. Reopen any console windows for the new PATH location to be available.

Alternate for building OpenCV from source

  1. Download the zip file named mingw provided in the repository and extract the folder inside
  2. Copy the folder mingw and paste it in the directory C:\opencv\build\x64 where you can see vc14 and vc15 folders.
  3. Follow steps 7 and 8 from above.

Check proper Installation

  1. Clone the repository using
git clone https://github.com/Abhishek-Nalawade/Installation-of-CMake-g-OpenCV-on-Windows
  1. Create build folder.
  2. cd build and type cmake -G "MSYS Makefiles" ..
  3. Next type make and after completion type shell-app. This should display the image if the installation was successfull.
  4. If the image is displayed OpenCV is now ready to be used with any other desired C++ projects with MinGW on windows.

install-cmake-make-gcc-opencv-on-windows's People

Contributors

abhishek-nalawade avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.