[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
!HELP! foreign function interface to Fortran
I am trying to use the foreign function interface
to access a Fortran subroutine. However, the interface
is complicated by the fact my machine (Sun 4) doesn't have
one system library used by the Fortran subroutine.
So the steps I am taking are:
 I went to another machine (Sun 4) which has the system library
f77 -c test.f
ld -Bstatic -r test.f -lnag (where nag is the needed library)
then I tranferred the binary object file "test.o," linked to nag library,
to my own machine. I tested the transferred subroutine "test.o" by
linking to the main program "main.f" via "f77 main.f test.o".
The entire Fortran program works fine.
 Then I go into CL (Allegro CL 3.1.beta.22 [Sun4]) and do the following:
<cl> (use-package :ff)
<cl> (require :foreign)
<cl> (load "test.o" :system-libraries '("F77" "I77")
; Foreign loading /home/radon1/users/hodges/klin/research/workstation_software/NAG/test/test.o with system libraries F77 I77.
Warning: Foreign load failed
 What puzzles me is all the undefined symbols can be found in
libF77.a and libI77.a in the default lib directories. I don't
know where I have done wrong????
I appreciate your help in advance. Thanks.