I am running a modelling sysytem written in C++, C and fortran. It was compiled in my office, but since I am interested in running it in my home computer, I tried to install it and the denpendent softwares in this computer.
My linux system at home is ubuntu so it is rather easy to install the softwares:
sudo apt-cache search software ----for searching for the right software package
sudo apt-get install software ----for installing it
Then before compiling it, I need modify the makefile !
1) the code uses gfortran, gcc,:
i installed gfortran 4.3 and gcc 4.3,
2) the code use lapack for linear algebra:
I installed liblapack.
3) then modify the makefile
CC = g++-4.3
F77 = gfortran-4.3
add the new path in the INCPATH:
INCPATH = -I/usr/include \
-I/usr/lib \
modify the link:
LINK = g++-4.3
modify the libs:
LIBS = -L/home/xiaoni/software/blitz -llapack -lgfortran
(In the end, I also modified the .bashrc with the correct path: export CPATH, LD_LIBRARY_PATH, CPLUS_INCLUDE_PATH, C_INCLUDE_PATH.)
The code can be compiled correctly !
Aucun commentaire:
Enregistrer un commentaire