Ask Your Question

Problem compiling cvBlobsLib with OpenCV 2.4.2

asked 2012-08-13 16:07:33 -0500

unxnut gravatar image

I am trying to compile cvBlobsLib under OpenCV 2.4.2 on Windows 7 using Visual Studio 2008. I get the following error:

1>------ Build started: Project: cvblobslib, Configuration: Release Win32 ------
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxv_w32.h(16) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>
1>Build log was saved at "file://c:\Users\v00000168\Documents\Visual Studio 2008\Projects\cvblobslib_OpenCV_v8_3\Release\BuildLog.htm"
1>cvblobslib - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have not been able to resolve it for some reason. I have been able to compile it without trouble in similar environment on Windows XP. On the same Windows 7 machine, I had previously compiled it with OpenCV 2.3.1.

Can someone please see what am I doing wrong? I have already wasted a couple of days chasing my tail here.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-08-14 14:21:58 -0500

unxnut gravatar image

I did not get any help but I should have RTFM'ed. The solution is found there. It was to comment the following line in the file BlobLibraryConfiguration.h:

#define _SHOW_ERRORS

I am putting my solution here so that someone else may benefit. I am a happy camper now, and have already run the testblobs code successfully.


edit flag offensive delete link more


@unxnut - Thanks for the suggestion mate!

wajihullahbaig gravatar imagewajihullahbaig ( 2013-02-18 11:19:41 -0500 )edit

Question Tools


Asked: 2012-08-13 16:07:33 -0500

Seen: 985 times

Last updated: Mar 12 '14