Mail Archives: cygwin/2013/01/13/10:21:12
On 13/01/2013 14:44, Angelo Graziosi wrote:
> Il 13/01/2013 15.31, Jon TURNEY ha scritto:
>> On 11/01/2013 12:54, Angelo Graziosi wrote:
>>> An application which need to be built with clang++, fails to build when it
>>> includes glx.h and indirectly windows.h headers like in the test case shown
>>> below.
>>>
>>> In short, X11/Xlib.h define Status as a macro (an alias for int) instead
>>> rpcdce.h uses Status a a pointer variable name...
>>
>> I don't think there's anything clang-specific about this problem. The same
>> issue can be seen with gcc.
>>
>> If your application needs both Xlib and Win32 interfaces, you should include
>> <X11/Xwindows.h> rather than <windows.h>, which wraps any conflicting
>> declarations.
>>
>> (xcb uses a sensible namespace, so this is not necessary for applications
>> which use xcb and Win32.)
>>
>> You probably need the latest upstream x11proto (not yet packaged for cygwin)
>> for this wrapping to work correctly with the mingw-w64 w32api headers [1]
>>
>> Alternatively you can work around this yourself e.g. as in [2]
>
>
> Thanks Jon, foo.cxx was anly a test case to reproduce the errors. In the true
> application those headers were included indirectly... :-(
>
> In file included from input_line_87:1:
> In file included from include/TX11GL.h:29:
> In file included from /usr/include/GL/glx.h:45:
> In file included from /usr/include/w32api/GL/gl.h:13:
This looks very wrong, mixing native and X GL headers isn't going to work.
Assuming you mean to build an X application, this should be finding
/usr/include/GL/gl.h, so maybe an include path issue?
> In file included from /usr/include/w32api/windows.h:88:
> In file included from /usr/include/w32api/rpc.h:70:
> /usr/include/w32api/rpcdce.h:142:88: error: expected ')'
> typedef void __RPC_API RPC_OBJECT_INQ_FN(UUID *ObjectUuid,UUID
> *TypeUuid,RPC_STATUS *Status);
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -