PDA

View Full Version : IC Imaging Control C++ Class Library error C1189 "This Library requires_WIN32_WINNT..



benmar007
May 22, 2012, 10:13:16
Hi,

i' am a student and using ICImaging Controll C++ Class Library 3.2 with Visual Studio 2010. When i try to build my application i get the following error message:

error C1189: #error : "This library requires _WIN32_WINNT to be at least 0x0500 (Windows 2000)" c:\users\bele\documents\ic imaging control 3.2\classlib\include\udshl_lnk.h

My system is: Windows 7 32 bit, Visual Studio 2010, Samsung R560 Notebook
My application is a "windows forms" application including OpenCV 2.3.1 (C++ Code).

Whats about that error? I think IC 3.2 should work with Windows 7.
Whats about combination of Windows Forms (C++) an IC 3.2?

Best regards Benjamin

Stefan Geissler
May 22, 2012, 14:15:31
Hi

Simply define

#define _WIN32_WINNT 0x0501
in your stdafx.h and you should be done.

benmar007
May 24, 2012, 17:48:07
Hi thank you for your answer, now i get some other errors:


error C2872: 'IServiceProvider': Mehrdeutiges Symbol C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\ocidl.h
error C2872: 'IMessageFilter': Mehrdeutiges Symbol c:\program files\microsoft visual studio 10.0\vc\include\comdefsp.h
error C2872: 'IDropTarget': Mehrdeutiges Symbol C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\ocidl.h
error C2872: 'IDataObject': Mehrdeutiges Symbol c:\program files\microsoft visual studio 10.0\vc\include\comdefsp.h

Whats about that? This error appeared after setting #define _WIN32_WINNT 0x0501 in stdafx.h

Thanks for this great support!

Best regard Benjamin

Stefan Geissler
May 25, 2012, 08:56:42
Benjamin,

Please check you includes and library settings. It seems, you link some things twice. Without seeing your project on my own, it is hard to determine, where the includes are doubled.

benmar007
May 29, 2012, 10:49:56
I solved the problems with error C2872. I set some namespaces at the wrong place, now it works.
Thanks for helping me with my problems.

Best regards Benjamin