Wednesday, May 2, 2012

Installing xmovie tool

xmovie is a simple visualisation tool, which comes with LAMMPS molecular dynamics software.

To install it, one needs just to type make in tools/xmovie directory. However, you can get an error:


xmovie.c:12:28: error: X11/StringDefs.h: No such file or directory
xmovie.c:14:27: error: X11/Intrinsic.h: No such file or directory
xmovie.c:15:26: error: X11/Xaw/Form.h: No such file or directory
xmovie.c:16:31: error: X11/Xaw/Cardinals.h: No such file or directory
In file included from xmovie.c:18:
xmovie.h:65: error: expected specifier-qualifier-list before ‘Bool’
xmovie.h:98: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘TopLevel’
xmovie.h:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CreateScene’
xmovie.h:102: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CreateControl’
xmovie.h:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ReadProc’
xmovie.h:118: error: expected ‘)’ before ‘*’ token
xmovie.h:122: error: expected ‘)’ before ‘w’
xmovie.h:125: error: expected ‘)’ before ‘w’
xmovie.h:132: error: expected ‘)’ before ‘*’ token
xmovie.h:133: error: expected ‘)’ before ‘*’ token
xmovie.h:134: error: expected ‘)’ before ‘bg’
...

This means, that X11 development packages are not installed. In Ubuntu/Debian systems, you can install them by typing:
sudo apt-get install libx11-dev libxaw7-dev

Then modify Makefile:
XLIBDIR = -L/usr/lib

The path can be different in your distribution, look for the location of libX11.a file. After that, you type make and get in executable.