Welcome
Guest
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Beginners
»
Installation questions
»
Pb in make advectionf90 for PhreeqcRM on linux
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Pb in make advectionf90 for PhreeqcRM on linux (Read 2773 times)
oatteia
Top Contributor
Posts: 32
Pb in make advectionf90 for PhreeqcRM on linux
«
on:
29/10/17 01:10 »
Hello,
I am not s o familair with compiling code but i ma trying! I have successfully compiled and installed phreeqcRM with the instructions givne in the readme.txt. I compiled the rm an iphreeqc interface to create the modules (.mod) Then i tried to compile with the following make file. and i get :
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o: in function « _start »:
(.text+0x20): undefined reference to « main »
advection_f90.o: in fonction « register_basic_callback_fortran_ »:
I don't understand where the main comes from?
makefile
PROGRAM = advection_f90
# Define the Fortran compile flags
#F90FLAGS= -gen-interfaces -warn interfaces -i8 -I/opt/intel/mkl/lib/include
F90= gfortran
# Define the libraries
SYSLIBS = -lc #-lm -lpthread
USRLIB = /home/oatteia/lib/libphreeqcrm.a \
OBJECTS = \
advection_f90.o \
all: advection
advection: $(OBJECTS)
-$(F90) $(F90FLAGS) -o advection_f90 $(OBJECTS) -Wl,--start-group $(USRLIB) -Wl,--end-group $(SYSLIBS)
advection.o:
$(F90) $(F90FLAGS) -c advection_f90.F90
.f.o:
$(F90) $(F90FLAGS) -c $<
# end
Logged
dlparkhurst
Global Moderator
Posts: 3949
Re: Pb in make advectionf90 for PhreeqcRM on linux
«
Reply #1 on:
29/10/17 03:18 »
The distribution is set up to use configure to compile and test PhreeqcRM. Use
make check
to test the compilation. Make sure you invoke the Fortran tests when you use configure.
If you are trying to use your own Makefile, the main is located in main.cpp. Advection_f90.f90 contains only a subroutine. Main.cpp calls a series of tests, including the F90 subroutine for advect (provided the fortran #ifdef is defined).
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Beginners
»
Installation questions
»
Pb in make advectionf90 for PhreeqcRM on linux