Compile X Window Manager
Iain Buclaw
ibuclaw at ubuntu.com
Mon May 20 09:10:12 PDT 2013
On 20 May 2013 16:29, Samms <matesax at gmail.com> wrote:
>
>
>
> "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
>
This only tells you that Xlib.so (or other name) does not exist on your system.
>
> And last:
>
> gdc ./main.d -o Refuja -L-L/usr/include/X11/ -L-lXlib
> /tmp/ccN5ul41.o: In function `_Dmain':
>
I've already said that gdc uses gcc switch syntax, not dmd.
> main.d:(.text+0x75): undefined reference to `_D3std1c5linux3X114Xlib17DefaultRootWindowFPS3std1c5linux3X114Xlib7DisplayZm'
> main.d:(.text+0xe6): undefined reference to `_D3std1c5linux3X114Xlib17DefaultRootWindowFPS3std1c5linux3X114Xlib7DisplayZm'
> main.d:(.text+0x163): undefined reference to `_D3std1c5linux3X114Xlib17DefaultRootWindowFPS3std1c5linux3X114Xlib7DisplayZm'
This tells you that you are not linking in the library for Xlib.d are
you instead supposed to compile X.d / Xlib.d with your application?
> main.d:(.text+0x3f): undefined reference to `XOpenDisplay'
> 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+0x155): undefined reference to `XGrabButton'
> 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
>
This tells you that you are not linking in the X11 library.
--
Iain Buclaw
*(p < e ? p++ : p) = (c & 0x0f) + '0';
On 20 May 2013 16:29, Samms <matesax at gmail.com> wrote:
> 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?
--
Iain Buclaw
*(p < e ? p++ : p) = (c & 0x0f) + '0';
More information about the D.gnu
mailing list