[zeromq-dev] error with include files "ocidl.h" & "oaidl.h"

Tamara Kustarova kustarova at fastmq.com
Mon Jun 22 16:41:42 CEST 2009


Hi,

the problem is that the headers ocidl.h and oaidl.h include windows.h, 
which includes winsock.h. Zmq uses winsock2.h, which redefines most of 
the data structures defined in winsock.h.
The solution is to include winsock2.h before anything includes windows.h.

#include <winsock2.h>
#include <zmq.hpp>
#include <ocidl.h>
#include <oaidl.h>

int main(){
   return 0;

}

kfadnis napsal(a):
> Hi,
> Has anyone seen this error or have solution for this ?
> This is for Visual Studio 2008 WinXP using Zeromq -0.6.1 build.
>  
> The following lines give me
>  
>
> #include
>
> "zmq.hpp"
>
> #include
>
> "ocidl.h"
>
> #include
>
> "oaidl.h"
>
> int main(){
>
> return 0;
>
> }
>
> -----------------------------------------------------------------------------------------------------------------
>
> 1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(1161) 
> : error C2061: syntax error : identifier 'LPMSG'
>
> 1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(2063) 
> : error C2061: syntax error : identifier 'LPMSG'
>
> 1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(2267) 
> : error C2061: syntax error : identifier 'LPMSG'
>
> 1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(3756) 
> : error C2061: syntax error : identifier 'LPMSG'
>
> 1>c:\program files\microsoft sdks\windows\v6.0a\include\ole2.h(260) : 
> error C2061: syntax error : identifier 'LPMSG'
>
> 1>c:\program files\microsoft sdks\windows\v6.0a\include\ole2.h(283) : 
> error C2061: syntax error : identifier 'LPMSG'
>
> 1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(1368) 
> : error C2061: syntax error : identifier 'MSG'
>
> 1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(1506) 
> : error C2061: syntax error : identifier 'MSG'
>
> 1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(1678) 
> : error C2061: syntax error : identifier 'MSG'
>
> 1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(2004) 
> : error C2061: syntax error : identifier 'MSG'
>
>  
>
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>   




More information about the zeromq-dev mailing list