Compile X Window Manager
Alexandr Druzhinin
drug2004 at bk.ru
Mon May 20 09:00:09 PDT 2013
20.05.2013 22:29, Samms пишет:
> I not have installed Xlib.d - it is overwrite of Xlib.h for D language...
>
> "in your app you use lib A you still need link B"
>
> I'm not idiot...
>
> "Samms, do you have the correct xlib dev packages installed?"
>
> I'm not idiot...
>
> "So that would be -L/path/to/Xlib -lXlib."
>
> gdc ./main.d -o Refuja -L/usr/include/X11/ -lXlib
> /usr/bin/ld: cannot find -lXlib
> collect2: ld returned 1 exit status
>
> And last:
>
> gdc ./main.d -o Refuja -L-L/usr/include/X11/ -L-lXlib
> /tmp/ccN5ul41.o: In function `_Dmain':
> main.d:(.text+0x3f): undefined reference to `XOpenDisplay'
> main.d:(.text+0x75): undefined reference to
> `_D3std1c5linux3X114Xlib17DefaultRootWindowFPS3std1c5linux3X114Xlib7DisplayZm'
>
> main.d:(.text+0x85): undefined reference to `XStringToKeysym'
> main.d:(.text+0x9c): undefined reference to `XKeysymToKeycode'
> main.d:(.text+0xd8): undefined reference to `XGrabKey'
> main.d:(.text+0xe6): undefined reference to
> `_D3std1c5linux3X114Xlib17DefaultRootWindowFPS3std1c5linux3X114Xlib7DisplayZm'
>
> main.d:(.text+0x155): undefined reference to `XGrabButton'
> main.d:(.text+0x163): undefined reference to
> `_D3std1c5linux3X114Xlib17DefaultRootWindowFPS3std1c5linux3X114Xlib7DisplayZm'
>
> main.d:(.text+0x1d2): undefined reference to `XGrabButton'
> main.d:(.text+0x20a): undefined reference to `XNextEvent'
> main.d:(.text+0x24c): undefined reference to `XRaiseWindow'
> main.d:(.text+0x29d): undefined reference to `XGetWindowAttributes'
> main.d:(.text+0x3f2): undefined reference to `XMoveResizeWindow'
> collect2: ld returned 1 exit status
>
> "so, what exactly you are trying to do?"
>
> Title this post: "Compile X Window Manager"
>
> That I would want to create X Window Manager?
You should build Xlib.d also and use correct path to library (your is
wrong) like:
gdc ./main.d path/to/Xlib.d -o Refuja -L-L/usr/lib/X11/ -L-lXlib
/usr/include/Xlib point to headers, not to libraries it would be better
to use something like above - I'm on windows now, can't say exactly.
More information about the D.gnu
mailing list