next up previous contents index
Next: Installation on Solaris 2.5 Up: Compiling Previous: Creating a semi-static version   Contents   Index

If it still won't compile

If all else fails, and for some reason it proves impossible to compile the program using make, as a last resort the program can be compiled manually as follows:

1. Run configure to generate config.h . Then check config.h and change it if necessary.

2. Compile calculator.y:

  yacc -d calculator.y  
  cp y.tab.c y.tab.cc
  gcc -c -x c++ -O3 -Wall -Wunused -W -I. -I/usr/include -I/usr/include/X11 \
    -I/usr/X11R6/include -I/usr/X11R6/include/Xbae  -I/usr/include y.tab.cc

3. Compile the C++ files. For example:

  gcc -c -O3 -Wall -Wunused -W -I. -I/usr/include -I/usr/include/X11 \
  -I/usr/X11R6/include -I/usr/X11R6/include/Xbae xmtnimage60.cc

The entries for Xbae should be omitted if libXbae is not installed. The above command must be executed for each *.cc file.

3. Link:

  gcc -o imal -O3 -Wall -Wunused -W xmtnimage*.o lex.yy.o y.tab.o \
  -L/usr/X11R6/lib  -lm -ltiff -lXext /usr/X11R6/lib/libXbae.a  \
  -lXm -lXpm -lXext -lXt -lX11 -lpng -lfl /usr/lib/libjpeg.so  -s

The -O3, -lXext, and -lXpm entries, and the entries starting with -W are not essential. The libXbae.a entry should be omitted if configure did not find libXbae. Some systems may not accept the xmtnimage*.o . If so, it must be replaced by a list of all the .o files.

Then install the executable by typing make install as root.



root 2008-10-10