More stuff about the headers

Shachar Shemesh wine-devel at shemesh.biz
Sun Sep 7 03:30:43 CDT 2003


Steven Edwards wrote:

>First thing is first. Whats up with the 
>*_must_be_suffixed_with_W_or_A_in_this_context error?
>  
>
If you are compiling a core Wine DLL, you are not allowed to use the 
base name (IDC_ARROW). You must pick either the Ansi (IDC_ARROWA) or 
Wide (IDC_ARROWW) versions. To achieve this, wine uses a macro called 
"WINELIB_NAME_AW". It is defined in windef.h. You can see that if 
UNICODE is defined, this macro adds the "W" at the end, if not defined, 
it adds an "A" at the end, but if it is part of the wine compilation, it 
defines a name that is bound to cause an error, by appending 
"func_must_be_suffixed_with_W_or_A_in_this_context".

In other words, if you need the Ansi version, use IDC_ARROWA. If you 
need the Unicode version, use IDC_ARROWW, but you cannot use IDC_ARROW 
from inside a Wine DLL.

>To build comctl32 with the Mingw/PSDK headers we need to do something about this.
>Almost every file is expecting IDC_ARROWA and the PSDK/w32api dont define a A/W suffix. I think
>once we fix this comctl32 should build out of the box with the PSDK or w32api.
>
Just use IDC_ARROWA directly. If you get this error, it implies that you 
are using the Wine headers already. As IDC_ARROW is defined in 
include/winuser.h on line 2560, and IDC_ARROWA is defined two lines 
above it, I find it hard to accept that IDC_ARROW is defined as it is, 
while IDC_ARROWA is undefined.

>Thanks
>Steven
>  
>
          Shachar

-- 
Shachar Shemesh
Open Source integration consultant
Home page & resume - http://www.shemesh.biz/





More information about the wine-devel mailing list