[Bug 35711] New: Winelib: compile error in wincon.h if NOGDI is defined before #include <windows.h>

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Mar 3 09:16:11 CST 2014


http://bugs.winehq.org/show_bug.cgi?id=35711

            Bug ID: 35711
           Summary: Winelib: compile error in wincon.h if NOGDI is defined
                    before #include <windows.h>
           Product: Wine
           Version: 1.4.1
          Hardware: x86-64
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: kernel32
          Assignee: wine-bugs at winehq.org
          Reporter: matteo at mitalia.net

As described in the summary; if I try to compile the following file

    #define NOGDI
    #include <windows.h>

    int main()
    {
        return 0;
    }

with winegcc (wine-dev package 1.4.1 from Ubuntu 13.10) I get

    In file included from /usr/include/wine/windows/windows.h:42:0,
                     from test.c:2:
    /usr/include/wine/windows/wincon.h:337:62: error: unknown type name
‘LPCONSOLE_FONT_INFOEX’
     WINBASEAPI BOOL WINAPI  
GetCurrentConsoleFontEx(HANDLE,BOOL,LPCONSOLE_FONT_INFOEX);
                                                                  ^
    /usr/include/wine/windows/wincon.h:375:62: error: unknown type name
‘LPCONSOLE_FONT_INFOEX’
     WINBASEAPI BOOL WINAPI  
SetCurrentConsoleFontEx(HANDLE,BOOL,LPCONSOLE_FONT_INFOEX);
                                                                  ^
    winegcc: gcc failed

This comes from the fact that the typedef LPCONSOLE_FONT_INFOEX (and related
types) is #ifdef-ed out when NOGDI is defined, but SetCurrentConsoleFontEx
(which depends from this type) is always included.

The bug makes compiling anything that uses the NOGDI option impossible.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list