Does the dub registry at code.dlang.org have problems?
Gary Willoughby
dev at nomad.so
Sat Jan 11 04:10:34 PST 2014
On Friday, 10 January 2014 at 22:07:41 UTC, Paulo Pinto wrote:
> Am 10.01.2014 22:16, schrieb Gary Willoughby:
>> On Friday, 10 January 2014 at 20:57:51 UTC, Paulo Pinto wrote:
>>> I used to be an heavy Tcl/Tk user on Windows NT/2000 during
>>> 1999 - 2001.
>>>
>>> Tk only imports X11 on UNIX platforms.
>>>
>>> http://core.tcl.tk/tk/tree?ci=tip
>>>
>>> --
>>> Paulo
>>
>> Looking at tk.h i see this:
>>
>> #ifndef _XLIB_H
>> # if defined(MAC_OSX_TK)
>> # include <X11/Xlib.h>
>> # include <X11/X.h>
>> # else
>> # include <X11/Xlib.h>
>> # endif
>> #endif
>>
>> Which intimates to me that all platforms include it? Then
>> tkDecls.h uses
>> types that the X11 headers define, e.g (XColor):
>>
>> EXTERN int Tk_CanvasPsColor(Tcl_Interp *interp, Tk_Canvas
>> canvas, XColor
>> *colorPtr);
>
>
> Yes, but if you cared to look at the rest of the code, you
> would have seen that those X11 calls are mapped to Win32 ones.
>
> Maybe I should have expressed myself better.
>
> --
> Paulo
I understand that the X11 calls will be translated to the Win32
Api on Windows in the Tk source but i was talking about the
headers.
I think i have found the problem.
At first glance dub seems to dumbly compile *everything* in the
source directory whether it's imported or not and in this case
that's a problem. In a few of the X11 D source files, C macros
are substituted using functions which call other X11 functions
which the linker then cannot resolve.
If i compile using the command line on Windows then only x.d and
xlib.d are in fact compiled which have no calls to any X11
function so there are no linker errors regarding X11.
Now i just need to understand linking tcl/tk on windows using the
optlink linker but that's a new thread :)
http://forum.dlang.org/thread/xbrciixzdwkoysnnymht@forum.dlang.org
More information about the Digitalmars-d
mailing list