hi,
I hope that somebody might be able to help me with my problem.
i am using ROMS (agrif version) and i try to compile my files. I use linux and g95. it keeps giving me error that looks like it cant find netcdf library or something.
i have set path for libnetcdf.a and netcdf.inc files in jobcomp file NETCDFLIB=-L and NETCDFLIB=-I. is there any other place where i have to set path for netcdf library? is there different netcdf.inc files for different versions of netcdf? (if so then where i can get them?)
I have read some posts here where people talked about double underscore conflict and checke my libnetcdf.a file with nm and i dont seam to have any double underscores, so that is also not reason.
any idea what could be reason for this errors?
That is the end of error i get:
nf_read_bry.o(.data+0x340): undefined reference to `nf_put_att_real_'
nf_read_bry.o(.data+0x344): undefined reference to `nf_put_att_int2_'
nf_read_bry.o(.data+0x348): undefined reference to `nf_open_'
nf_read_bry.o(.data+0x34c): undefined reference to `nf_put_att_text_'
nf_read_bry.o(.data+0x350): undefined reference to `nf_put_var1_int1_'
nf_read_bry.o(.data+0x354): undefined reference to `nf_put_var1_int2_'
nf_read_bry.o(.data+0x358): undefined reference to `nf_put_var1_int_'
nf_read_bry.o(.data+0x35c): undefined reference to `nf_put_var1_double_'
nf_read_bry.o(.data+0x360): undefined reference to `nf_put_var1_real_'
nf_read_bry.o(.data+0x364): undefined reference to `nf_put_var_int_'
nf_read_bry.o(.data+0x368): undefined reference to `nf_put_var_double_'
nf_read_bry.o(.data+0x36c): undefined reference to `nf_put_var1_text_'
nf_read_bry.o(.data+0x370): undefined reference to `nf_inq_varid_'
nf_read_bry.o(.data+0x374): undefined reference to `nf_put_var_real_'
nf_read_bry.o(.data+0x378): undefined reference to `nf_put_var_int2_'
nf_read_bry.o(.data+0x37c): undefined reference to `nf_put_vara_double_'
nf_read_bry.o(.data+0x380): undefined reference to `nf_put_var_text_'
nf_read_bry.o(.data+0x384): undefined reference to `nf_put_vara_int2_'
nf_read_bry.o(.data+0x388): undefined reference to `nf_put_vara_real_'
nf_read_bry.o(.data+0x38c): undefined reference to `nf_put_vara_int1_'
nf_read_bry.o(.data+0x390): undefined reference to `nf_put_vara_int_'
nf_read_bry.o(.data+0x394): undefined reference to `nf_put_varm_int1_'
nf_read_bry.o(.data+0x398): undefined reference to `nf_put_varm_int2_'
nf_read_bry.o(.data+0x39c): undefined reference to `nf_put_varm_int_'
nf_read_bry.o(.data+0x3a0): undefined reference to `nf_put_varm_double_'
nf_read_bry.o(.data+0x3a4): undefined reference to `nf_put_varm_text_'
nf_read_bry.o(.data+0x3a8): undefined reference to `nf_put_varm_real_'
nf_read_bry.o(.data+0x3ac): undefined reference to `nf_put_vars_int1_'
nf_read_bry.o(.data+0x3b0): undefined reference to `nf_put_vars_int_'
nf_read_bry.o(.data+0x3b4): undefined reference to `nf_put_vars_int2_'
nf_read_bry.o(.data+0x3b8): undefined reference to `nf_put_vars_real_'
nf_read_bry.o(.data+0x3bc): undefined reference to `nf_put_vars_text_'
nf_read_bry.o(.data+0x3c0): undefined reference to `nf_redef_'
nf_read_bry.o(.data+0x3c4): undefined reference to `nf_put_vars_double_'
nf_read_bry.o(.data+0x3c8): undefined reference to `nf_put_vara_text_'
nf_read_bry.o(.data+0x3cc): undefined reference to `nf_rename_dim_'
nf_read_bry.o(.data+0x3d0): undefined reference to `nf_rename_var_'
nf_read_bry.o(.data+0x3d4): undefined reference to `nf_set_fill_'
nf_read_bry.o(.data+0x3d8): undefined reference to `nf_set_base_pe_'
nf_read_bry.o(.data+0x3dc): undefined reference to `nf_sync_'
nf_read_bry.o(.data+0x3e0): undefined reference to `nf_rename_att_'
nf_read_bry.o(.data+0x3e4): undefined reference to `nf_put_var_int1_'
nf_read_bry.o(.data+0x3e8): undefined reference to `nf_inq_attlen_'
nf_read_bry.o(.data+0x3ec): undefined reference to `nf_get_att_int1_'
ROMS compiling error, netcdf
You are use a different compiler for compile the netcdf library and the roms-agrif stuff....
If you use g95 for compile roms, get an netcdf library compiled by g95...
Use different compilers is also possible, but it require use some options about the way the compiler put the name to the object code... (second underscore related...)
The easy way is use the same compiler for the netcdf and roms....
Note that you can put in your system different versions of netcdf. Use the "--prefix=xxxx" option with the configure script when you compile netcdf in order to put the specific version in the dir you like.... Then edit the makefiles of roms to say it whe the netcdf library is....
The FC and F90 environment vars is useful to chose the compiler you desire...
If you use g95 for compile roms, get an netcdf library compiled by g95...
Use different compilers is also possible, but it require use some options about the way the compiler put the name to the object code... (second underscore related...)
The easy way is use the same compiler for the netcdf and roms....
Note that you can put in your system different versions of netcdf. Use the "--prefix=xxxx" option with the configure script when you compile netcdf in order to put the specific version in the dir you like.... Then edit the makefiles of roms to say it whe the netcdf library is....
The FC and F90 environment vars is useful to chose the compiler you desire...