[ncarg-talk] Compiling old code

Orion Poplawski orion at cora.nwra.com
Mon Nov 10 16:58:58 MST 2014


On 11/10/2014 04:34 AM, Raymond D Wright wrote:
> Thanks to Orion for the suggestion about libX11-devel. No joy, though. I
> have it on my system. I am trying to compile a program that uses ncarg
> (TERRAIN from the met model MM5). I installed NCL on this computer and
> that gave me a set of static libraries (all ending in ".a"), but I don't
> have libX11.a on my system. I do have libX11.so and libX11.so.6, but I
> don't know how to make the compiler use them, in order to end up witha
> working TARRAIN system, since the "-lX11" flag would only link libX11.a,
> which isn't there (no longer available).
> 
> Here is the Makefile section for Linux with an intel compiler:
> 
> intel:
> echo "Compiling for Linux using INTEL compiler"
> ( $(CD) src ; $(MAKE) all \
> "RM = $(RM)" "RM_LIST = $(RM_LIST)" \
> "LN = $(LN)" "MACH = SGI" \
> "MAKE = $(MAKE)" "CPP = /lib/cpp" \
> "CPPFLAGS = -I. -C -traditional -D$(NCARGRAPHICS) " \
> "FC = ifort  " "FCFLAGS = -I. -w90 -w95 -convert big_endian "\
> "LDOPTIONS = -i_dynamic" "CFLAGS = -I." \
> "LOCAL_LIBRARIES= -L$(NCARG_ROOT)/lib -L/usr/X11R6/lib -lncarg
> -lncarg_gks -lncarg_c -lX11 -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3
> -lg2c" ) ; \
> ( $(RM) terrain.exe ; $(LN) src/terrain.exe . ) ;
> 
> On my system, the X11 shared libraries, mentioned above, are
> under /usr/lib64.
> 
> Any advice will be greatly appreciated.
> 
> Ray Wright
> 

Again, there should be any need for any special flags to compile against the
shared library.  Perhaps if you posted the actual compile error?


-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion at nwra.com
Boulder, CO 80301                   http://www.nwra.com


More information about the ncarg-talk mailing list