Hello World: Error

Jerrold Clint Balansi jcx4ever at gmail.com
Mon Apr 23 13:55:34 PDT 2012


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
> /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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20120423/f8bdea12/attachment.html>


More information about the xorg mailing list