![]() |
Blitz Support : |
From: Matthias Schillinger (matthias_at_[hidden])
Date: 2003-09-09 05:46:18
Hi everybody,
since I've managed now (after a hard and tedious fight ;-) )to install
blitz++ from CVS for a non-default compiler into a non-default directory, I'd
like to post the performed steps. This may be helpful for others, since it is
a quite general case.
I wanted to use gcc-3.2 which is not the default compiler on our system and I
had to install the library into my home directory, since I don't have root
permissions. In brief:
Compiler: /opt/gcc-3.2/bin/g++
Where to install: $HOME
The shell I use is bash.
Before doing anything I had to add $HOME/bin at first position to the PATH.
***
export PATH="$HOME/bin:$PATH"
******
First I had to update the versions of
libtool ( version >=1.4.3 )
autoconf ( version >=2.57 )
automake ( version >=1.7.6 )
by downloading the tarballs and doing
***
./configure --prefix=$HOME
make
make install
******
in the corresponding directories.
Then I did a "cvs checkout" following the instructions on
http://www.oonumerics.org/blitz/download/ .
After that
***
cd blitz
export LD_RUN_PATH="/opt/gcc-3.2/lib:`pwd`/lib/.libs"
autoreconf -fiv
./configure --with-cxx="gcc:/opt/gcc-3.2/bin/g++" --prefix=$HOME
make
make install
unset LD_RUN_PATH
******
The libraries can now be found in $HOME/lib,
the headers in $HOME/include and
the user guide in $HOME/doc.
To compile a program which uses blitz++ I do
***
export LD_RUN_PATH="/opt/gcc-3.2/lib:$HOME/lib"
/opt/gcc-3.2/bin/g++ -I$HOME/include -L$HOME/lib program.cpp -o program
-lblitz -lm
unset LD_RUN_PATH
******
Hope that helps,
Matthias
P.S.: With setting LD_RUN_PATH it was not necessary to use the
--disable-shared flag for ./configure .
-- *====================================================* Dipl. Phys. Matthias Schillinger Institut fuer Theorie der Kondensierten Materie / Universitaet Karlsruhe *====================================================*