Which X11 headers/binding are you using?
i want to apologize, i wasn't using any. But recently i've used X11 from "DSource bindings project". This message appears when i compile the code with it:
ldc -w -disable-linker-strip-dead main.d extra.d X.d Xlib.d -L-lX11 pkg-config --cflags --libs gtkd-3
Xlib.d(20): Error: use alias instead of typedef
Xlib.d(21): Error: use alias instead of typedef
Xlib.d(146): Error: use alias instead of typedef
Xlib.d(388): Warning: instead of C-style syntax, use D-style syntax 'byte[32] autorepeats'<br>Xlib.d(465): Error: use alias instead of typedef<br>Xlib.d(488): Error: use alias instead of typedef<br>Xlib.d(489): Error: use alias instead of typedef<br>Xlib.d(507): Error: use alias instead of typedef<br>Xlib.d(508): Error: use alias instead of typedef<br>Xlib.d(525): Error: use alias instead of typedef<br>Xlib.d(548): Error: use alias instead of typedef<br>Xlib.d(549): Error: use alias instead of typedef<br>Xlib.d(566): Error: use alias instead of typedef<br>Xlib.d(567): Error: use alias instead of typedef<br>Xlib.d(577): Warning: instead of C-style syntax, use D-style syntax 'byte[32] keyvector'
Xlib.d(838): Warning: instead of C-style syntax, use D-style syntax 'byte[20] b'
Xlib.d(839): Warning: instead of C-style syntax, use D-style syntax 'short[10] s'
Xlib.d(840): Warning: instead of C-style syntax, use D-style syntax 'long[5] l'
Xlib.d(914): Warning: instead of C-style syntax, use D-style syntax 'long[24] pad'
Xlib.d(1011): Error: use alias instead of typedef
Xlib.d(1012): Error: use alias instead of typedef
Xlib.d(1013): Error: use alias instead of typedef
Xlib.d(1069): Error: use alias instead of typedef
Xlib.d(1070): Error: use alias instead of typedef
Xlib.d(1073): Error: use alias instead of typedef
Xlib.d(1079): Error: use alias instead of typedef
make: *** [makefile:21: comp] Error 1
Then i tried with "Deimos" and everything went well (with the same compile command as above), until I executed the program:
"core.exception.RangeError@modelo.d(124): Range violation"
This is the code with Deimos:
<code>
import std.stdio, std.process, core.thread;
import extra;
import deimos.X11.X, deimos.X11.Xlib;
int main(string[] args) {
clear_screen();
XInitThreads();
Main.init(args);
Vista *pW;
Vista w = new Vista();
pW = &w;
pW.init_ui();
Main.run();
delete pW;
return 0;
}
</code>