NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] problem linking to 4.2

You need both -lnetcdff -lnetcdf
On Sep 22, 2013 2:16 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/
>
  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: