0

I've been looking all over the web for a proper code for that library but whenever i try to build it using CMake 3.4.2 it gives me errors and when i try to build the resulting visual studio project (using Visual Studio 2015) it gives me errors as well and doesn't build successfully.

Is there any way to properly install this library and use it in Visual Studio 2015?

Thanks!

EDIT: Screen shot of the error i get when pressing on "Generate": enter image description here

Gambit2007
  • 3,260
  • 13
  • 46
  • 86
  • 1
    The proper way is to configure and compile using CMake. – drescherjm Mar 29 '16 at 16:18
  • I know, that's what i did, but like i said - i couldn't find any version of the code that won't give me errors, so i was wondering if anyone knows a place i could get it from. – Gambit2007 Mar 29 '16 at 16:19
  • 1
    ***i couldn't find any version of the code that won't give me errors*** I meant for you to fix the errors or at least post them here or at github for the project to fix them. However I see from the github page that that the author has mentioned that he no longer maintains the project. https://github.com/Steelskin/cvblob/issues/1 – drescherjm Mar 29 '16 at 16:22
  • I may be wrong, but I was under the impression that `cvBlob` was superseded by `cv::contours`... – kmdreko Mar 29 '16 at 16:27
  • I actually managed to get a compiled version of cvblobslib.lib but for some reason Visual Studio keeps giving me an error of not being able to open BlobResult.h – Gambit2007 Mar 29 '16 at 16:49
  • I expect that means your include path is missing a folder. You probably did not add a include_directories() in your CMakeLists.txt for your application. – drescherjm Mar 29 '16 at 16:50
  • I downloaded that cvblobslib.lib file from somewhere in the web, i didn't create it myself. Shouldn't it still work? – Gambit2007 Mar 29 '16 at 16:52
  • If it is a static library you may be fine (provided you have the required headers). If there is a dll it will not work (may appear to work but have UB) unless it was built for Visual Studio 2015. – drescherjm Mar 29 '16 at 16:53
  • i recently successfully compiled [OpenCVBlobsLib](https://github.com/OpenCVBlobsLib/opencvblobslib) with VS2015 by downloading [pthreads-win32 files](ftp://sourceware.org/pub/pthreads-win32/dll-latest/) – sturkmen Mar 29 '16 at 19:16
  • could you please elaborate more on the process? – Gambit2007 Mar 29 '16 at 19:27
  • what did you try ? i downloaded [include files](ftp://sourceware.org/pub/pthreads-win32/dll-latest/include/), [pthreadVC2.lib](ftp://sourceware.org/pub/pthreads-win32/dll-latest/lib/x64/) and [pthreadVC2.dll](ftp://sourceware.org/pub/pthreads-win32/dll-latest/dll/x64/) and put them in [opencvblobslib-master\library](https://github.com/OpenCVBlobsLib/opencvblobslib/tree/master/library) then enter PTHREADS_INCLUDE_DIR and PTHREADS_LIB_DIR as opencvblobslib-master\library – sturkmen Mar 29 '16 at 23:28
  • I just tried downloading that library from different sources around the web (i just googled it), and no matter what version of the code i downloaded, i got an error when i tried building it using CMake. I'll just follow your instructions and see if it works. Could you please provide me with a link to where you downloaded the cvBlobsLib from? – Gambit2007 Mar 30 '16 at 12:14
  • [download link of opencvblobslib](https://codeload.github.com/OpenCVBlobsLib/opencvblobslib/zip/master) – sturkmen Mar 30 '16 at 15:07
  • cool thanks! i'll give it a shot and let you know how it went! just what is the PTHREADS_INCLUDE_DIR and PTHREADS_LIB_DIR you were talking about? – Gambit2007 Mar 30 '16 at 15:42
  • Those are variables you set in `cmake-gui` during the configure stage. – drescherjm Mar 30 '16 at 16:26
  • ohhh okay.. thanks! like i said i'll let you know asap if it worked! – Gambit2007 Mar 30 '16 at 17:20
  • still get an error.. i've edited my original post with a screenshot of what happens when i press on "Generate" – Gambit2007 Mar 30 '16 at 23:13
  • Does that path exist on your computer? Did you build opencv? – drescherjm Mar 31 '16 at 13:27
  • the path C:\opencv_git\mybuild\install\x86\vc14\lib\include doesn't exist but the path C:\opencv_git\mybuild\install\x86\vc14\lib exists. I did build opencv though and it works perfectly for me. So how do i change that C:\opencv_git\mybuild\install\x86\vc14\lib\include path to a path that actually exists? and what's even supposed to be there? – Gambit2007 Mar 31 '16 at 14:27
  • try setting OpenCV_DIR C:\opencv_git\mybuild – sturkmen Mar 31 '16 at 15:19
  • still gives me the same error :/ – Gambit2007 Apr 02 '16 at 20:36

0 Answers0