Building 32bit libraries opencv

前端 未结 1 861
囚心锁ツ
囚心锁ツ 2021-01-06 08:35

I recently downloaded and built opencv in my 64-bit Windows machine using cmake. All the binaries are included in the install folder and it contain

相关标签:
1条回答
  • 2021-01-06 08:39

    Steps for mingw from with cmake-gui from this guide. We could also do this easily on command prompt with cmake and -m32 option. But using cmake-gui will give you more idea about the options available for opencv configuration and bring you in better position if you want to customize opencv build tomorrow ( like enabling java wrapper or OpenCL etc ).

    1. Start cmake-gui.
    2. Set source path to downloaded opencv directory and build path to your choice as in image

      enter image description here

    3. Click Configure button and specify generator as mingw makefiles as in image

      enter image description here

    4. Choose compilers ( here we choose 32 bit ) as in image and click Finish button.

    enter image description here

    1. An options page will be listed.

      5.1. Edit CMAKE_INSTALL_PREFIX to change the install location if you want to.

      5.2. Select ENABLE_CXX11 if it isn't already selected.

      5.3. Change other options only if you are familiar with them. Then click Configure again and then click 'Generate` to generate make files.

    2. Modify opencv\sources\modules\videoio\src\cap_dshow.cpp and add this define at the top of the file:

      #define STRSAFE_NO_DEPRECATE
      
    3. In command prompt( at build path ) type mingw32-make ( add mingw32-make folder to PATH if required )

    4. On completion, type mingw32-make install
    0 讨论(0)
提交回复
热议问题