| |
| Posted by Bill Baxter | PermalinkReply |
|
Bill Baxter
| On Mon, Sep 8, 2008 at 4:51 PM, Bill Baxter <wbaxter@gmail.com> wrote:
> Just did an update of DWT for the first time in a long time and got these errors building the dwt-win library:
>
> dwt\graphics\TextLayout.d(135): function
> dwt.internal.win32.WINAPI.IIDFromString (wchar*,byte*) does not match
> parameter types (char*,byte*)
> dwt\graphics\TextLayout.d(135): Error: cannot implicitly convert
> expression (cast(char*)toCharArray("{275c23e2-3747-11d0-9fea-00aa003f8646}\x00"))
> of type char* to wchar*
> dwt\graphics\TextLayout.d(136): function
> dwt.internal.win32.WINAPI.IIDFromString (wchar*,byte*) does not match
> parameter types (char*,byte*)
> dwt\graphics\TextLayout.d(136): Error: cannot implicitly convert
> expression (cast(char*)toCharArray("{DCCFC162-2B38-11d2-B7EC-00C04F8F5D9A}\x00"))
> of type char* to wchar*
>
> I'm using the released Tango 0.99.7 version built from source.
>
> These lines that are the source of the error appear to be incorrect.
>
>
> OS.IIDFromString("{275c23e2-3747-11d0-9fea-00aa003f8646}\0".toCharArray().ptr,
> CLSID_CMultiLanguage.ptr);
>
> IIDFromString takes a wide char string in the Win32 api, and toCharArray from dwthelper\utils.d is returning a regular char[].
>
> One fix would be to make a new "toWCharArray" function in utils.d, with body like this:
>
> public wchar[] toWCharArray( String str ){
> return toString16(str);
> }
>
> Then use that in TextLayout instead of toCharArray.
Just wanted to add that I tried doing the above, and it did make the problem go away. (I was still waiting for dwt-lib to finish compiling when I posted that). So that was the only error in the dwt-win build.
--bb
|