Build OpencvBlobsLib in Windows environment

1

How to run the OpenCVBlobsLib library compilation in Microsoft Visual Studio 2013 (works in earlier versions)

    
asked by anonymous 26.12.2014 / 13:20

1 answer

2

Step by step (I put this tutorial in github issues but it was closed)

  • I downloaded cvBlobslib ( link )
  • Create an empty project in Visual Studio 2013
  • Place the 6 .h files and 5 .cpp files in the project
  • Bind all OpenCV dependencies ( link )
  • Download this file: 1.17MB pthreads-w32-2-9-1-release.zip and unzip the folder: C:\pthreads.hWin32 (I created this folder)
  • This folder has 3 subfolders: Pre-built.2 , pthreads.2 , QueueUserAPCEx .
  • Pre-built.2 had 3 subfolders: Lib (2 subfolders: x64 with libpthreadGC2.a (Extension .a) and pthreadVC2.lib, x86 I do not use) and dll , include with 3 .h.
  • Add the include folder to Additional include directories(MVS) .
  • Add the folder lib to Additional include directories .
  • Add pthreadVC2.lib into the lib folder
  • Change the "Configuration Type" in Configuration Properties - > > General for Static Library .lib
  • Add this line above all .cpp files: pragma warning (disable: 4996) // Esta função ou variável pode ser inseguro
  • From the main menu, select Release / x64 and I clicked on BUILD - >> Build Solution
  • In the folder: C:\Users\<nomeDoSeuUsuario>\Documents\Visual Studio 2013\Projects\cvBlobsLib\x64\Release You will find the cvBlobsLib.lib library with 11,554 KB.
  • You can download the result here: link

        
    26.12.2014 / 13:20