Hello,
I also seem to be having problems with creating and using
shared objects. This is my first try with this sort of
thing and I'm just trying to add a fairly simple C function.
Here's my ncl script:
external GAC "./gacsel.so"
begin
rmin=.75
rmax=12.3
cint=0
GAC::gacsel(rmin, rmax, 5, cint, cmin, cmax)
print( "cint = " + cint )
end
And here's the error message:
ncl gactest.ncl
Copyright (C) 1995-2003 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 4.2.0.a030
The use of this software is governed by a License Agreement.
See http://ngwww.ucar.edu/ncl/ for more details.
fatal:Error adding argument template for intrinsic function
fatal:syntax error: gacsel is not a procedure in package GAC
I've followed all the steps in the page on Extending NCL
and had nothing more than some warnings from nhlcc about
a couple lines from standard ncarg includes not having
explicit types. Here are the steps, for clarity:
nhlcc -c Init.c
nhlcc -c gacsel.c
nhlcc -c gacsel_W.c
ld -o gacsel.so Init.o gacsel.o gacsel_W.o -G
I'm pretty sure gacsel is defined in the shared lib so I'm
at a bit of a loss as to what's really wrong:
nm gacsel.so | grep gacsel
gacsel.so:
[43] | 1528| 736|FUNC |GLOB |0 |5 |gacsel
[24] | 0| 0|FILE |LOCL |0 |ABS |gacsel.c
[1] | 0| 0|FILE |LOCL |0 |ABS |gacsel.so
[46] | 2264| 212|FUNC |GLOB |0 |5 |gacsel_W
[29] | 0| 0|FILE |LOCL |0 |ABS |gacsel_W.c
this is all happening on a Sun:
uname -a
SunOS frazil 5.8 Generic_108528-21 sun4u sparc SUNW,Ultra-5_10
what am I missing???
thanks,
dave
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Mon Jan 12 2004 - 21:40:27 MST