On 09/10/2016 05:45 PM, Edgar wrote:

Thanks!

I was getting this error message without "XInitThreads":

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
flfr: xcbio.c:274: pollforevent: Assertion `!xcbxlibthreadssequence_lost' failed.
Aborted (core dumped)

Now i'm compiling with the correct linker flag "-L-lX11". But i'm geting this new message:

ldc -w -disable-linker-strip-dead main.d extra.d -L-lX11 pkg-config --cflags --libs gtkd-3
main.d(11): Error: undefined identifier 'XInitThreads'
make: *** [makefile:21: comp] Error 1

And when i try to import X11 from the code:

Error: module X is in file 'X11/X.d' which cannot be read

This is what the main.d file contains:

import std.stdio, std.process, core.thread;
import extra;
import X11.X, 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;

}

What am i doing wrong?

Which X11 headers/binding are you using?