[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Support #ZRS-101988]: netcdf problem



>
> I am having problems compiling and linking my program, which attempts
> to write data to a netcdf file. It calls functions such as nf_def_dim,
> nf_def_var, etc.
>
> I'm running MAC OS 10.4.11. The netcdf version is 3.6.2. Attached are
> configure-out2.txt, make-out2.txt, check-out2.txt. Prior to
> configuring, I set
>
> setenv F77 /sw/bin/g77
> setenv CC /usr/bin/gcc
>
> and configured using ...
>
> configure --disable-largefile --disable-compiler-recover
> --enable-separate-fortran --disable-f90
>

Did the "make check" work when you did this? NetCDF is known to build well with
g77.

> The error output from my program make is:
>
> f77 -g -o hrd-wind-wr.x -v  -s -O   hrd-wind-wr.o    -L/usr/local/lib
> -lnetcdff -lnetcdf_c++ -lnetcdf
> c++ hrd-wind-wr.o -L/Applications/Absoft/lib -o hrd-wind-wr.x -g
> -L/usr/local/lib -lnetcdff -lnetcdf_c++ -lnetcdf -lfio -lf77math
> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
> _nf_close
> _nf_create
> _nf_def_dim
> _nf_def_var
> _nf_enddef
> _nf_put_att_text
> _nf_put_var_real
> _nf_strerror
> collect2: ld returned 1 exit status
>

Are you sure you are using the fortran compiler you think you are using? I
notice: L/Applications/Absoft/lib in your compile line.

Also you are using c++ to compile fortran code? Is it g++ or what?

Does your fio library call some netCDF functions? If so, you must move it in
your list of libraries.

Let me know if this doesn't help...

Thanks,

Ed

Ticket Details
===================
Ticket ID: ZRS-101988
Department: Support netCDF
Priority: Normal
Status: Closed