[Wrf-users] plotgrids and plotfmt

Gerardo Cisneros gcstoianowski at gmail.com
Tue Aug 13 11:01:48 MDT 2013


David,

You wrote:
> There are no files with a lncarg prefix anywhere,

That is because the argument to the linking command is
a shorthand.  Consider your failing command:

>>> gfortran -o plotgrids.exe -g module_map_utils.o module_debug.o cio.o
>>> constants_module.
>>> o misc_definitions_module.o \
>>> plotgrids.o -L/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX1
>>> 1
>>> /usr/bin/ld: cannot find -lncarg

When a linking command includes an argument that has the
form -lXXX, it tells the linker to look for a library called libXXX.so
or libXXX.a in one directories in the library search path, which
includes the paths specified by arguments of the form
-L/pathYYY; in your command above, those directories would
be /lib and /usr/X11R6/lib.  Judging from the proximity of -L/lib
to -lncarg, -lncarg_gks and -lncarg_c in your command, I am
pretty certain your build configuration thinks it can find the
NCAR Graphics libraries under /lib.

You then wrote:
> but I do find files such as
>
> /usr/local/ncarg/6.1.2/lib/libncarg.a
> /usr/local/ncarg/6.1.2/lib/libncarg_c.a
> /usr/local/ncarg/6.1.2/lib/libncarg_gks.a
> /usr/local/ncl_ncarg-6.0.0/intel/lib/libncarg.a
> /usr/local/ncl_ncarg-6.0.0/intel/lib/libncarg_c.a
> /usr/local/ncl_ncarg-6.0.0/intel/lib/libncarg_gks.a
> /usr/local/ncl_ncarg-6.0.0/intel/lib/libncarg_ras.a

This tells me you actually have two versions of the libraries:
6.1.2 and 6.0.0.  Let's assume that what you actually want
is 6.1.2.  Then you have to find the way to replace "-L/lib"
in your linking command above with "-L/usr/local/ncarg/6.1.2/lib".
If things work the way they used to, this may simply entail
setting an environment variable:

setenv NCARG_ROOT /usr/local/ncarg/6.1.2

if you use csh or tcsh as your shell, or

export NCARG_ROOT=/usr/local/ncarg/6.1.2

if you use sh, ksh or bash, before attempting your build.

Saludos,

Gerardo
-- 
Dr. Gerardo Cisneros
Apdo Postal 19-152
Col San Jose Insurgentes
03901 Mexico DF
+52-55-55637958 (home office)


More information about the Wrf-users mailing list