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

[netCDF #LPR-530788]: Undefined reference



> Dear sir,
>
> I have compiled the netcdf on linux using ifort and used -O3 option.  It
seemed to have some difficulties in compiling the the source code.
>
> This is the source code I used to compile;
>
> $ ifort -O3 deform_1.f  /usr/lib/libnetcdf.a -o deform
>
> However, when I run the source code above and some errors come out like this;
>
> /tmp/ifortAxQu9r.o(.text+0x101d): in function 'MAIN__':
> : undefined reference to `nf_open_'
> /tmp/ifortAxQu9r.o(.text+0x10fe): in function 'MAIN__':
> : undefined reference to `nf_inq_varid_'
> /tmp/ifortAxQu9r.o(.text+0x11dd): in function 'MAIN__':
> : undefined reference to `nf_put_var_real_'
> /tmp/ifortAxQu9r.o(.text+0x12af): in function 'MAIN__':
> : undefined reference to `nf_close_'
>
> And for your information, I have already declared the netcdf.inc file
location in my deform_1.f program. Do you have any suggestions due to what the
error might be? I really need some urgent information from you. Thank you so
much for your attention.
>
> Sincerely,
> Zaty
>

Howdy Zaty!

The netCDF build is known to work with ifort on Linux. I suggest you try again
without the -O3 and see if it works for you.

Please let me know the result.

Thanks,

Ed

Ticket Details
===================
Ticket ID: LPR-530788
Department: Support netCDF
Priority: Normal
Status: Open