Can't Link DWT in Linux 64-bit
Mike via Digitalmars-d-dwt
digitalmars-d-dwt at puremagic.com
Fri Jul 18 16:47:58 PDT 2014
On Monday, 14 July 2014 at 19:18:46 UTC, Jacob Carlborg wrote:
>
> As for the guidance. I think it's easiest to just try and
> compile it for 64bit and see what errors you get. Then I can
> help with more specific problems that you encounter.
>
Well, I haven't tried to build yet, but I have been going through
the source code, and I found something interesting.
I downloaded the swt source code for both Win32 and Win64, and
compared them in WinMerge.
What's interesting is the source code is littered with stuff like
this:
File: org/eclipse/swt/widgets/IME.java
SWT - Win32
*******************
LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
if (!isInlineEnabled ()) return null;
int /*long*/ hwnd = parent.handle;
int /*long*/ hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
if (OS.ImmGetOpenStatus (hIMC)) {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE,
0);
}
OS.ImmReleaseContext (hwnd, hIMC);
}
return null;
}
SWT - Win64
********************
LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
if (!isInlineEnabled ()) return null;
long /*int*/ hwnd = parent.handle;
long /*int*/ hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
if (OS.ImmGetOpenStatus (hIMC)) {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE,
0);
}
OS.ImmReleaseContext (hwnd, hIMC);
}
return null;
}
DWT
********************
LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
if (!isInlineEnabled ()) return null;
auto hwnd = parent.handle;
auto hIMC = OS.ImmGetContext (hwnd);
if (hIMC !is null) {
if (OS.ImmGetOpenStatus (hIMC)) {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR,
OS.CPS_COMPLETE, 0);
}
OS.ImmReleaseContext (hwnd, hIMC);
}
return null;
}
It appears DWT has modeled any `Handle`s as `void*`, and
therefore uses `auto` whenever possible. I could probably do a
search & replace for "int /*long*/" or "/*long*/ int" and replace
it with "ptrdiff_t" and cover 80% of the necessary changes.
Thoughts?
Also, could you please answer the following questions for me?
* What version of SWT is the current DWT source code based on?
* How would you like me to submit pull requests?
Little-by-little, or one big whopper?
* How does one go about testing DWT?
Thanks for the help.
Mike
More information about the Digitalmars-d-dwt
mailing list