[f2py] Linking to static library quadpack
"R. O'Gara" <ronogara-/[email protected]> Tue, 23 Nov 2010 14:50:05 -0800 (PST)
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
Hello all, I'm very new to f2py and have a following issue. I'm trying to link to quadpack library in the following way This is in integrate.f90, just a simple integral of 2x from a to b --- subroutine f1(a,b,z) implicit none real abserr real, parameter :: epsabs = 0.0E+00 real, parameter :: epsrel = 0.001E+00 real, external :: f02 integer ier integer, parameter :: key = 6 integer neval real, parameter :: pi = 3.141592653589793E+00 real result real, parameter :: true = 0.06278740E+00 real, intent(in) :: a,b real, intent(out) :: z call qag ( f02, a, b, epsabs, epsrel, key, result, abserr, neval, ier ) z = result end real function f02 ( x ) implicit none real, intent(in) :: x f02 = 2*x end ---- I am trying to link this in the following way f2py integrate.f90 $HOME/lib/f90/libquadpack.a (or f2py integrate.f90 -L$HOME/lib/f90 -lquadpack) In both cases I get the following error: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC ... I presume that the library itself should be ok because I use it with no problems with other files, i.e. gfortran example.o -L$HOME/lib/f90 -lquadpack works just fine any help/hint is much appreciated! Thank you for your time. _______________________________________________ f2py-users mailing list f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] http://cens.ioc.ee/mailman/listinfo/f2py-users