Hi Fortran experts,
I hope someone can help with this.
I am trying to link my application to the ngmath library. For some
reason it does not work. I have therefore written a small test program
which calls some subroutines in libngmath:
> cat test.f90
program test
real, dimension(2) :: xin, yin
real, dimension(2) :: vin, xout, yout, vout
integer :: ierr
xin = (/1, 2/)
yin = (/1, 2/)
vin = (/1, -1/)
xout = (1.5)
yout = (1.5)
call nnseti('EXT - extrapolation control',1)
call nnsetr('NUL - function value when extrapolation not
allowed',-1.)
call natgrids(2,xin,yin,vin,1,1,xout,yout,vout,ierr)
write(0,*) vout
end
I have placed the ngmath library file in the current working
directory:
> pgf90 -L. -lngmath -o test test.o
test.o: In function `MAIN_':
test.f90:(.text+0xdd): undefined reference to `nnseti_'
test.f90:(.text+0xf1): undefined reference to `nnsetr_'
test.f90:(.text+0x13d): undefined reference to `natgrids_'
If I use nm on the library file the subroutines seem to exist:
> nm libngmath.a |grep nnseti_
0000000000000357 T nnseti_
> nm libngmath.a |grep nnsetr_
000000000000063c T nnsetr_
> nm libngmath.a |grep natgrids_
00000000000001f5 T natgrids_
I have tried using ar to extract the .o files from the library and
link to them directly. That works but is really not an option.
Regards,
Jesper


|