jan@lipari.usc.edu (Jan Vandenbrande) (10/31/87)
Can someone out there help me with the foreign function interface of Common Lisp running on a Sun 3/260? The problem is as follows: I am trying to call a fortran77 function from lisp. So far all works fine except, except that I don't seem to be able to write anything to output, or to a file for that matter, from that fortran routine. All it does is create the file (for std. output this is fort.6) but never writes anything into this file. To load the fortran function and libraries I do the following in Lisp: (define-fortran-function foo (S i) :result-type :integer) (load-foreign-files '("foo.o") '("-lU77" "-lF77" "-lI77" "-lc")) where foo.o is the f77 -c foo.f of something like: Integer function foo(S,I) Integer i character*10 s print*, "WhyDoesN'T ThisPRINT", i .... C More irrelevant stuff .... return end I tried all kinds of things (formatted output, creating new files, etc), but nothing has worked so far. When foo is linked with a regular fortran program, it works just fine. Anyone have an idea? My impression is that somehow some print buffer doesn't get "flushed" but I have no clue on how to do that. Jan Send mail directly to : jan%lipari@oberon.usc.edu arpa: jan%lipari@oberon.usc.edu vdb@usc-cse.csnet (or vdb%usc-cse@csnet-relay.arpa), vdb@usc-cse.usc.edu uucp: ..!{{decvax,ucbvax}!sdcsvax,hplabs,allegra,trwrb}!sdcrdcf!uscvax!vdb