Hello,
Hopefully someone can help me out with what should be a very simple
process. I've used the f77 API a few times to manipulate netcdf files.
I've always used a sun with sun's workshop compilers. To compile I use
the following syntax which works fine:
f77 -o <outputfilename> <input.f> /usr/local/netcdf/lib/libnetcdf.a -
I/usr/local/netcdf/include
I wanted to try out the f90 API because it seemed cleaner and more
efficient. I've been trying to use the first example in the netcdf
tutorial, simple_xy_wr.f90, but have had no luck.
Setting the location of the module libraries (the newest libraries,
3.6.2) with the -M flag, I tried
--------
f90 -o test simple_xy_wr.f90 -M/usr/local/netcdf/include
Undefined first referenced
symbol in file
netcdf.nf90_def_dim_ simple_xy_wr.o
netcdf.nf90_close_ simple_xy_wr.o
netcdf.nf90_def_var_manydims_ simple_xy_wr.o
netcdf.nf90_put_var_2d_fourbyteint_ simple_xy_wr.o
netcdf.nf90_create_ simple_xy_wr.o
netcdf.nf90_strerror_ simple_xy_wr.o
netcdf.nf90_enddef_ simple_xy_wr.o
ld: fatal: Symbol referencing errors. No output written to test
-------
So no luck. I then included the libnetcdf.a file:
f90 -o test simple_xy_wr.f90 -
M/usr/local/netcdf/include /usr/local/netcdf/lib/libnetcdf.a
Undefined first referenced
symbol in file
__f95_error_message_and_abort /usr/local/netcdf/lib/libnetcdf.a
(netcdf.o)
ld: fatal: Symbol referencing errors. No output written to test
This error I don't understand. Can anyone help me out or do I need just
stick with f77?
Thanks in advance!
Cheers,
Brent
Brent A. McDaniel
==============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================