[comp.lang.lisp] Allegro CL <-> MPW C/C++

cearl@aristotle.ils.nwu.edu (Charles Earl) (12/21/89)

I am trying to call a C++ program written in MPW C++ v3.1 from Allegro Common 
Lisp. The test C++ program simply computes the factorial of the integer
argument. 

I compile the C++ program succesfully, load the Lisp FF.fasl file, and load
the C++ object with the following call to ff-load

(ff-load "CPlusExamples;simple.cp.o"
         :entry-names '("fac")
         :ffenv-name 'test
         :libraries '("CPlusExamples;SimpleLib.o"))

where "fac" is the name of the factorial routine, "simple.cp.o" is the object,
and SimpleLib.o, created with the MPW Lib routine, contains the objects that
simple.cp needs to link to.

When this command is evaled, Allegro reports: "Unknown Object File version (2)
in #<Object #174, "hd:mpw:examples:CPlusExamples:simple.cp.o", a 
CCL::*FILE-STREAM*>". Further, when deffcfun is evaluated 
("(deffcfun (factorial "fac") (fixnum) :long)") ACL reports that there is no
"fac" entry point.

Have I grossly missed somehthing, or is the version 1.2.2 of ACL I have 
incompatable with C++ insofar as the foreign function interface is concerned?

Comments, theories welcomed.

CEarl