PhreeqcUsers Discussion Forum

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • PHREEQC installation »
  • Installing »
  • 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 526 times)

oatteia

  • Contributor
  • Posts: 1
Pb in make advectionf90 for PhreeqcRM on linux
« on: October 29, 2017, 01:10:24 AM »
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

  • Top Contributor
  • Posts: 1270
Re: Pb in make advectionf90 for PhreeqcRM on linux
« Reply #1 on: October 29, 2017, 03:18:43 AM »
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 »
  • PHREEQC installation »
  • Installing »
  • Pb in make advectionf90 for PhreeqcRM on linux
 

  • SMF 2.0.3 | SMF © 2011, Simple Machines
  • XHTML
  • RSS
  • WAP2