bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems using windows.h and thread.h


From: Andrey Kulikov
Subject: Re: Problems using windows.h and thread.h
Date: Thu, 16 Oct 2003 14:33:18 +0400

Hello Armin,

Thursday, October 16, 2003, 1:10:32 PM, you wrote:

AB> Hi!

AB> Im using commoncpp2-1.0.13, Win2k and VC++6. If I compile a
AB> project which uses thread.h but not windows.h, e.g. the tests,
AB> everything is fine! If I want to use windows.h and thread.h I get
AB> in trouble with winsock2.h!

AB> C:\Program Files\Microsoft Visual
AB> Studio\VC98\INCLUDE\winsock2.h(99) : error C2011: 'fd_set' :
AB> 'struct' type redefinition
AB> C:\Program Files\Microsoft Visual
AB> Studio\VC98\INCLUDE\winsock2.h(134) : warning C4005: 'FD_SET' :
AB> macro redefinition
AB>         C:\Program Files\Microsoft Visual
AB> Studio\VC98\INCLUDE\winsock.h(743) : see declaration of 'recvfrom'

AB> ..and so on!
AB> Whats the matter?
AB> Thanks!

It becoms because your windows.h include winsock.h, but CommonC++
include winsock2.h
For solving this problem update your Platform SDK (i try it on
Platform SDK 2000, and everything was be ok), or everywhere where you
include windows.h you must write:

#define _WINSOCKAPI_
#include <windows.h>

On the VC++ 7.1 (VS2003) this problems not appears.


-- 
Best regards,
 Andrey                            mailto:address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]