-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test: Fortran + C + NetCDF | compiling | Mac #2579
Comments
@HathewayWill @Ilovecodinghaha I'm seeing the same thing, I'm trying to figure it out too. Looks like netcdf.inc wasn't made |
One thing that is interesting is that make check comes back without any errors or fails. |
I think this might be the problem, netcdf fortran isn't being created. |
Possible source of the issue???
|
Standard outputs for MacOS 13:
|
There was a stray file name without the appropriate linker in the LIBS variable that caused this issue for @Ilovecodinghaha |
Hi there,
I just installed libraries and tried to test it, following https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php 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
zsh
gcc (Homebrew GCC 12.2.0) 12.2.0
NetCDF 4.9
Many many thanks
The text was updated successfully, but these errors were encountered: