Yair,
It looks like you built the libraries as static, not shared. If so,
then you need to specify every static library that will be needed. To
begin, specify both Netcdf libraries in the compile command, not just
one or the other: -lnetcdff -lnetcdf. You may also need to add other
libraries if Netcdf-4 was enabled when you built netcdf-C. Please see
"If you built static libraries" near the bottom of this page:
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html
Also I think there is a small mistake in that paragraph. One of the
options is -curl, but it should probably be -lcurl. This is needed
only if Netcdf4 was enabled.
If that does not fix the problem, then please show what options were
specified when you built the Netcdf libraries.
--Dave
On Sun, Sep 22, 2013 at 2:15 AM, Yair suari <yairsuari@xxxxxxxxx> wrote:
> Hi all and thanks.
> I try to use 4.2 (FORTRAN, Linux 64) for the first time unsuccessfully.
> I successfully installed the C and FORTRAN libraries (make check was OK for
> both)
> I did nf-config --libs and got -L/usr/local/lib -lnetcdf -lm
>
> so my compilation command is:
>
> ifort pom08.f -o a.out -L/usr/local/lib -lnetcdf -lm
>
> but the library was not found, i got the errorr:
>
> undefined reference to `nf_put_vara_real_'
>
> so i then tried to compile with:
>
> ifort pom08.f -o a.out -L/usr/local/lib -lnetcdff -lm
>
> and got a different message:
> ....fort-attio.c:15: undefined reference to `nc_put_att_text'
>
> somehow the fortran library cant use the c library.
>
> sorry but i cant figure it out, any help is appreciated
>
> --
> Non-smartphone user - be patient
>
>
> Yair Suari
> Geva Carmel, Israel 30855
> Phone-0528-524520, 04-9840943
>
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/