Hello World: Error

Peter Hutterer peter.hutterer at who-t.net
Mon Apr 23 14:22:25 PDT 2012


On Mon, Apr 23, 2012 at 01:55:34PM -0700, Jerrold Clint Balansi wrote:
> Hello,
> 
> I am trying to make a Hello World program from code from this site:
> http://www.paulgriffiths.net/program/c/srcs/helloxsrc.html
> 
> However, when I try to compile and run it I get this error. Can some give
> me a hint. Thank you.
> 
> [root at vizwall Desktop]# gcc -o HelloX HelloX.c

gcc -lX11 -o ...

Cheers,
  Peter

> > /tmp/ccMGGmGj.o: In function `main':
> > HelloX.c:(.text+0x42): undefined reference to `XAllocSizeHints'
> > HelloX.c:(.text+0x52): undefined reference to `XAllocWMHints'
> > HelloX.c:(.text+0x62): undefined reference to `XAllocClassHint'
> > HelloX.c:(.text+0x9d): undefined reference to `XOpenDisplay'
> > HelloX.c:(.text+0x219): undefined reference to `XCreateSimpleWindow'
> > HelloX.c:(.text+0x232): undefined reference to `XStringListToTextProperty'
> > HelloX.c:(.text+0x272): undefined reference to `XStringListToTextProperty'
> > HelloX.c:(.text+0x34d): undefined reference to `XSetWMProperties'
> > HelloX.c:(.text+0x362): undefined reference to `XSelectInput'
> > HelloX.c:(.text+0x373): undefined reference to `XLoadQueryFont'
> > HelloX.c:(.text+0x3c1): undefined reference to `XCreateGC'
> > HelloX.c:(.text+0x3dd): undefined reference to `XSetFont'
> > HelloX.c:(.text+0x40f): undefined reference to `XSetForeground'
> > HelloX.c:(.text+0x41f): undefined reference to `XMapWindow'
> > HelloX.c:(.text+0x434): undefined reference to `XNextEvent'
> > HelloX.c:(.text+0x4c7): undefined reference to `XTextWidth'
> > HelloX.c:(.text+0x570): undefined reference to `XDrawString'
> > HelloX.c:(.text+0x5a0): undefined reference to `XUnloadFont'
> > HelloX.c:(.text+0x5b0): undefined reference to `XFreeGC'
> > HelloX.c:(.text+0x5bc): undefined reference to `XCloseDisplay'
> > collect2: ld returned 1 exit status
> > [root at vizwall Desktop]#
> >
> >
> 
> -jerrold

> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.x.org/mailman/listinfo/xorg
> Your subscription address: peter.hutterer at who-t.net




More information about the xorg mailing list