Compilation Problem Fedora Core 6

From: Michael Irl Zimmerman <mzimmer3_at_nyahnyahspammersnyahnyah>
Date: Thu, 01 Nov 2007 19:15:13 -0400

Hello all,

I am trying to learn how to use NCARG in a C code. I compiled
NCARG-4.4.2 from source and copied the libraries and header files into
/usr/lib and /usr/include/ncarg, respectively.

Now I am adding lines to my code step by step to see if I can work out
the bugs. Here is my c code that compiles and runs:

#include <ncarg/gks.h>
int main(void)
{
  gopen_gks(0,0);
// gopen_ws(1,NULL,1);
  return 0;
}

The following modification does not compile:

#include <ncarg/gks.h>

int main(void)
{
  gopen_gks(0,0);
  gopen_ws(1,NULL,1);
  return 0;
}

My makefile looks like this:

ncarg: ncarg.c
        gcc -o ncarg ncarg.c /usr/lib/libngmath.a /usr/lib/libncarg_c.a
/usr/lib/libncarg_gks.a /usr/lib/libncarg.a
/usr/lib/gcc/i386-redhat-linux/3.4.6/libg2c.a

and I get these errors:

[mike_at_localhost ncarg]$ rm -f ncarg && make
gcc -o ncarg ncarg.c /usr/lib/libngmath.a /usr/lib/libncarg_c.a
/usr/lib/libncarg_gks.a /usr/lib/libncarg.a
/usr/lib/gcc/i386-redhat-linux/3.4.6/libg2c.a
/usr/lib/libncarg_gks.a(gesc.o): In function `gesc_':
gesc.f:(.text+0x87c): undefined reference to `i1mach_'
/usr/lib/libncarg_gks.a(g01wdr.o): In function `.L24':
g01wdr.f:(.text+0x35b): undefined reference to `i1mach_'
g01wdr.f:(.text+0x593): undefined reference to `gbytes_'
g01wdr.f:(.text+0x70c): undefined reference to `gbytes_'
g01wdr.f:(.text+0x743): undefined reference to `gbytes_'
/usr/lib/libncarg_gks.a(g01wdr.o): In function `.L26':
g01wdr.f:(.text+0x91a): undefined reference to `i1mach_'
/usr/lib/libncarg_gks.a(wks.o): In function `delfil_':
wks.c:(.text+0x50): undefined reference to `GetNCARGPath'
/usr/lib/libncarg_gks.a(wks.o): In function `rdwks_':
wks.c:(.text+0x6b2): undefined reference to `bcopyswap'
/usr/lib/libncarg_gks.a(wks.o): In function `wrtwks_':
wks.c:(.text+0x87b): undefined reference to `bcopyswap'
wks.c:(.text+0x949): undefined reference to `bcopyswap'
/usr/lib/libncarg_gks.a(wks.o): In function `opnwks_':
wks.c:(.text+0xd10): undefined reference to `GetNCARGPath'
/usr/lib/libncarg_gks.a(gwiwdr.o): In function `.L20':
gwiwdr.f:(.text+0x2a8): undefined reference to `i1mach_'
/usr/lib/libncarg_gks.a(fort_c.o): In function `.L16':
fort_c.c:(.text+0x108): undefined reference to `ErrGetNum'
fort_c.c:(.text+0x10f): undefined reference to `ErrGetMsg'
fort_c.c:(.text+0x1bb): undefined reference to `ErrGetMsg'
fort_c.c:(.text+0x228): undefined reference to `ErrGetMsg'
fort_c.c:(.text+0x2eb): undefined reference to `ErrGetMsg'
/usr/lib/libncarg_gks.a(gksc.o): In function `.L39':
gksc.c:(.text+0x297): undefined reference to `ESprintf'
/usr/lib/libncarg_gks.a(gksc.o): In function `.L46':
gksc.c:(.text+0x383): undefined reference to `ESprintf'
/usr/lib/libncarg_gks.a(gksc.o): In function `.L47':
gksc.c:(.text+0x3fb): undefined reference to `ESprintf'
/usr/lib/libncarg_gks.a(gksc.o): In function `.L48':
gksc.c:(.text+0x470): undefined reference to `ESprintf'
/usr/lib/libncarg_gks.a(gksc.o): In function `.L49':
gksc.c:(.text+0x50e): undefined reference to `ESprintf'
/usr/lib/libncarg_gks.a(gksc.o):gksc.c:(.text+0x586): more undefined
references to `ESprintf' follow
/usr/lib/libncarg_gks.a(g01flb.o): In function `g01flb_':
g01flb.f:(.text+0x8b): undefined reference to `sbytes_'
g01flb.f:(.text+0xb4): undefined reference to `sbytes_'
g01flb.f:(.text+0x108): undefined reference to `sbytes_'
/usr/lib/libncarg_gks.a(gflcnv.o): In function `gflcnv_':
gflcnv.f:(.text+0xa1): undefined reference to `ishift_'
/usr/lib/libncarg_gks.a(gmflod.o): In function `gmflod_':
gmflod.f:(.text+0x96): undefined reference to `sbytes_'
/usr/lib/libncarg_gks.a(gwiflb.o): In function `gwiflb_':
gwiflb.f:(.text+0x98): undefined reference to `sbytes_'
gwiflb.f:(.text+0xbf): undefined reference to `sbytes_'
gwiflb.f:(.text+0xe7): undefined reference to `sbytes_'
/usr/lib/libncarg_gks.a(gks_device.o): In function `GKS_GetDevByName':
gks_device.c:(.text+0x173): undefined reference to `ESprintf'
/usr/lib/libncarg_gks.a(xattribute.o): In function `X11_SetClipIndicator':
xattribute.c:(.text+0x336): undefined reference to `XSetClipRectangles'
xattribute.c:(.text+0x36c): undefined reference to `XSetClipRectangles'
xattribute.c:(.text+0x3a2): undefined reference to `XSetClipRectangles'
xattribute.c:(.text+0x3d8): undefined reference to `XSetClipRectangles'
xattribute.c:(.text+0x40e): undefined reference to `XSetClipRectangles'
/usr/lib/libncarg_gks.a(xattribute.o):xattribute.c:(.text+0x444): more
undefined references to `XSetClipRectangles' follow
/usr/lib/libncarg_gks.a(xattribute.o): In function `X11_SetClipIndicator':
xattribute.c:(.text+0x460): undefined reference to `XSetClipMask'
xattribute.c:(.text+0x477): undefined reference to `XSetClipMask'
xattribute.c:(.text+0x48e): undefined reference to `XSetClipMask'
xattribute.c:(.text+0x4a5): undefined reference to `XSetClipMask'
xattribute.c:(.text+0x4bc): undefined reference to `XSetClipMask'
/usr/lib/libncarg_gks.a(xattribute.o):xattribute.c:(.text+0x4d3): more
undefined references to `XSetClipMask' follow
/usr/lib/libncarg_gks.a(xattribute.o): In function
`X11_SetLineWidthScaleFactor':
xattribute.c:(.text+0x5bc): undefined reference to `XChangeGC'
/usr/lib/libncarg_gks.a(xattribute.o): In function `X11_free_ci':
xattribute.c:(.text+0x683): undefined reference to `XFreeColors'
/usr/lib/libncarg_gks.a(xattribute.o): In function
`X11_SetColorRepresentation':
xattribute.c:(.text+0x8fb): undefined reference to `XStoreColor'
xattribute.c:(.text+0x963): undefined reference to `XAllocColor'
xattribute.c:(.text+0xb80): undefined reference to `XSetWindowBackground'
xattribute.c:(.text+0xb92): undefined reference to `XClearWindow'
xattribute.c:(.text+0xbcc): undefined reference to `XChangeGC'
xattribute.c:(.text+0xbea): undefined reference to `XChangeGC'
xattribute.c:(.text+0xc08): undefined reference to `XChangeGC'
xattribute.c:(.text+0xc26): undefined reference to `XChangeGC'
xattribute.c:(.text+0xc44): undefined reference to `XChangeGC'
/usr/lib/libncarg_gks.a(xattribute.o):xattribute.c:(.text+0xcaa): more
undefined references to `XChangeGC' follow
/usr/lib/libncarg_gks.a(xattribute.o): In function `set_foreground_color':
xattribute.c:(.text+0xf27): undefined reference to `XSetForeground'
/usr/lib/libncarg_gks.a(xattribute.o): In function `X11_SetLinetype':
xattribute.c:(.text+0x125e): undefined reference to `XSetDashes'
xattribute.c:(.text+0x1298): undefined reference to `XSetDashes'
.
.
.
.
.

The errors go on for many lines. Any thoughts or suggestions as to a
solution?

Best regards,
Mike
_______________________________________________
ncarg-talk mailing list
ncarg-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Thu Nov 01 2007 - 17:15:13 MDT

This archive was generated by hypermail 2.2.0 : Wed Jan 23 2008 - 14:22:51 MST