Compiling xplanet on OpenBSD
I’ve been running with a plain coloured background in my window manager for a while, but I wanted to run something more fun. Since I tried it last (back in 2000 or so), xplanet has become much more featureful, so I decided to try it out.
However, there’s no OpenBSD port of it, so I had to compile it myself.
After downloading and untarring, I ran the configure
script. I
missed some warnings about libraries that couldn’t be found (more on
this below) but got an exit zero from the script. Onward to make
.
Now make barfed when compiling some cpp files in the src/libprojection
directory. The error was:
ProjectionBonne.cpp: In method `ProjectionBonne::ProjectionBonne(int, int, int)':
ProjectionBonne.cpp:37: implicit declaration of function `int snprintf(...)'
Chris Davies suggested adding the line
#include <stdio.h>
to the affected CPP files (three in all) and the make went swimmingly from then on.
Well, until I tried to run the app. That’s when I found out I didn’t have JPEG support compiled in.
I did have the libraries and headers needed, but they were in
/usr/local
. I used the following invocation to configure
to remedy
this:
./configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
The next step is to find some images of planets other than Earth. For some reason (IP related, no doubt) they’re not included in the source distribution.
Posted at 16:07,
in the comp category. Comments [0]
Submit this story to: » del.icio.us
» digg
» reddit. Search for it on
technorati.
Submit a comment
Please enter comments as plain text only; HTML is not supported. Submitting an URL is optional.
Comments are moderated and may not appear immediately.
Comments are closed for this story.