Jump to page: 1 24  
Page
Thread overview
Compile X Window Manager
May 19, 2013
Samms
May 19, 2013
Iain Buclaw
May 19, 2013
Samms
May 19, 2013
Samms
May 19, 2013
Iain Buclaw
May 20, 2013
Samms
May 20, 2013
Samms
May 20, 2013
evilrat
May 20, 2013
Samms
May 20, 2013
evilrat
May 20, 2013
Samms
May 20, 2013
evilrat
May 20, 2013
Alexandr Druzhinin
May 20, 2013
Samms
May 20, 2013
Samms
May 20, 2013
Samms
May 20, 2013
Alexandr Druzhinin
May 20, 2013
Iain Buclaw
May 20, 2013
Samms
May 20, 2013
Alexandr Druzhinin
May 20, 2013
Iain Buclaw
May 20, 2013
Samms
May 21, 2013
evilrat
May 21, 2013
Samms
May 21, 2013
Iain Buclaw
May 21, 2013
eles
May 21, 2013
Samms
May 21, 2013
eles
May 21, 2013
Samms
May 21, 2013
Samms
May 21, 2013
Mike Wey
May 21, 2013
eles
May 21, 2013
Samms
May 22, 2013
Samms
May 23, 2013
evilrat
May 23, 2013
Samms
May 20, 2013
Iain Buclaw
May 20, 2013
Iain Buclaw
May 19, 2013
Hi,
I found X.d and Xlib.d replacement for X11 library of C language. But it returned many errors when compiling. Some problems was in non-static declaration, but how can I resolve this problems:

gdc ./main.d -o Refuja
/tmp/ccysZHrg.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

Thank you.
May 19, 2013
On 19 May 2013 20:58, Samms <matesax@gmail.com> wrote:

> Hi,
> I found X.d and Xlib.d replacement for X11 library of C language. But it
> returned many errors when compiling. Some problems was in non-static
> declaration, but how can I resolve this problems:
>
> gdc ./main.d -o Refuja
> /tmp/ccysZHrg.o: In function `_Dmain':
> main.d:(.text+0x3f): undefined reference to `XOpenDisplay'
> main.d:(.text+0x75): undefined reference to `_**
> D3std1c5linux3X114Xlib17Defaul**tRootWindowFPS3std1c5linux3X11**
> 4Xlib7DisplayZm'
> 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 `_**
> D3std1c5linux3X114Xlib17Defaul**tRootWindowFPS3std1c5linux3X11**
> 4Xlib7DisplayZm'
> main.d:(.text+0x155): undefined reference to `XGrabButton'
> main.d:(.text+0x163): undefined reference to `_**
> D3std1c5linux3X114Xlib17Defaul**tRootWindowFPS3std1c5linux3X11**
> 4Xlib7DisplayZm'
> 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
>
> Thank you.
>

By linking in Xlib into your program.


Regards
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


May 19, 2013
But what option do I use? I cannot find in the manual classical -l... And path - absolute or relative?
May 19, 2013
On Sunday, 19 May 2013 at 20:28:13 UTC, Samms wrote:
> But what option do I use? I cannot find in the manual classical -l... And path - absolute or relative?

And - Xlib.h or Xlib.d or...?
May 19, 2013
On May 19, 2013 9:30 PM, "Samms" <matesax@gmail.com> wrote:
>
> On Sunday, 19 May 2013 at 20:28:13 UTC, Samms wrote:
>>
>> But what option do I use? I cannot find in the manual classical -l...
And path - absolute or relative?
>
>
> And - Xlib.h or Xlib.d or...?

You seem to be going about this the illogical way.   Do you have experience writing X applications in C or C++?

Regards
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


May 20, 2013
Yes (I'm programmer for 7 years.), but this is not work... (-l Xlib.h)
May 20, 2013
Paths:

import std.c.linux.X11.Xlib;
import std.c.linux.X11.X;

/usr/include/d2/4.6/std/c/linux/X11
May 20, 2013
20.05.2013 10:51, Samms пишет:
> Yes (I'm programmer for 7 years.), but this is not work... (-l Xlib.h)
Hmm... you ask unusual questions for a programmer with 7 year expirience. :) Try read gcc man about -l option - it says that after -l should be lib name without lib prefix (depends on OS) and .lib/.a/.so/etc suffix, IIRC. In other words just try -lxlib like:
gdc ./main.d -lXlib -o Refuja
May 20, 2013
gdc ./main.d -o Refuja -L /usr/include/X11/ -l Xlib

Not work...
May 20, 2013
gdc ./main.d -o Refuja -lXlib/usr/bin/ld: cannot find -lXlib
collect2: ld returned 1 exit status

Etc. Nothing works...
« First   ‹ Prev
1 2 3 4