I have been doing some light OpenGL programming for a couple of months and now I want to write a screensaver using the xscreensaver library.
I saw How to develop linux screen saver before asking this but I think that particular question is not specific enough.
What I have done already-
I downloaded the xscreensaver source and read README.hacking. I am fooling around with the code for greynetic.c(one of the screensavers jwz suggested for understanding xscreensaver in the readme) in the source's hacks directory.
I read this webpage - http://www.dis.uniroma1.it/~liberato/screensaver/simplesquares.html (from one of the answers of the linked question). And I downloaded the simplesquares.c code and I'm trying to run it.
What my problem is-
- I don't understand how I should go about compiling and executing any changes I make to any of the screensavers.
- Compiling the previously mentioned simplesquares.c with gcc and running the executable shows no output at all. Am I doing something wrong?
Note: You have to add -lX11 to the gcc command in order to link the X11 library when compiling simplesquares.c Otherwise it will return undefined reference errors.
Edit:
On compiling the screensaver greynetic.c, it returns a few errors, some of which i have reproduced here:
greynetic.c:(.text+0x4f): undefined reference to `XGetWindowAttributes'
greynetic.c:(.text+0xa6): undefined reference to `get_boolean_resource'
greynetic.c:(.text+0xd9): undefined reference to `get_pixel_resource'
greynetic.c:(.text+0x112): undefined reference to `get_pixel_resource'
greynetic.c:(.text+0x13e): undefined reference to `get_integer_resource'
greynetic.c:(.text+0x185): undefined reference to `XCreateGC'
greynetic.c:(.text+0x1dd): undefined reference to `XCreatePixmapFromBitmapData'
This is probably a linking error.