Hi there,
I just installed libraries and tried to test it, following instruction step by step.
There were some errors after running each comment, but the screen displayed correctly, so can anyone help me to check if I install the libraries correctly please? If it's not correct, could you please point it out?
gfortran -c 01_fortran+c+netcdf_f.f
01_fortran+c+netcdf_f.f:5:0:
5 | INCLUDE 'netcdf.inc'
|
Fatal Error: Cannot open included file 'netcdf.inc'
compilation terminated.
gcc -c 01_fortran+c+netcdf_c.c
#return nothing
gfortran 01_fortran+c+netcdf_f.o 01_fortran+c+netcdf_c.o -L${NETCDF}/lib -lnetcdff -lnetcdf
ld: file not found: 01_fortran+c+netcdf_f.o
collect2: error: ld returned 1 exit status
./a.out
C function called by Fortran
Values are xx = 2.00 and ii = 1
SUCCESS test 4 fortran calling c
Mac Intel OS13
gcc (Homebrew GCC 12.2.0) 12.2.0
NetCDF 4.9
I just installed libraries and tried to test it, following instruction step by step.
There were some errors after running each comment, but the screen displayed correctly, so can anyone help me to check if I install the libraries correctly please? If it's not correct, could you please point it out?
gfortran -c 01_fortran+c+netcdf_f.f
01_fortran+c+netcdf_f.f:5:0:
5 | INCLUDE 'netcdf.inc'
|
Fatal Error: Cannot open included file 'netcdf.inc'
compilation terminated.
gcc -c 01_fortran+c+netcdf_c.c
#return nothing
gfortran 01_fortran+c+netcdf_f.o 01_fortran+c+netcdf_c.o -L${NETCDF}/lib -lnetcdff -lnetcdf
ld: file not found: 01_fortran+c+netcdf_f.o
collect2: error: ld returned 1 exit status
./a.out
C function called by Fortran
Values are xx = 2.00 and ii = 1
SUCCESS test 4 fortran calling c
Mac Intel OS13
gcc (Homebrew GCC 12.2.0) 12.2.0
NetCDF 4.9