>Um, what platform are we talking about? What Lisp implementation?
>What C or C++ implementation?
>On my Macintosh, with Macintosh Common Lisp and Metrowerks Codewarrior,
>it's easy (provided you do not care about supporting old Macs.).
>You simply compile the C and C++ as a shared library, provide a
>pointer to the library, define a few entry points in Lisp, and
>you're off. It is necessary that the main program be in Lisp
>and the C or C++ in a shared library.
No No. l I want the other way around. I want to know if I can write code
in LISP and link it into a program i've written in C or C++. It shouldn't
matter what platform or implementation of anything I'm on, unless there are
only certain LISP compilers that can do this. C functions have a standard
calling convention. It's a matter of whether or not the LISP compiler can
compile it to a C function. All it really has to do is put the underscore
in front of a function name (of course i know nothing about LISP or how it
handles functions. the whole reason i started the thread is because i want
to know what i can and can't do with LISP, seeing as how i'm about to start
getting heavily into AI programming.) But just to clarify i'm using Windows
NT 4.0 and Visual Studio 6.0. So i want to write some functions in LISP,
compile them into a .DLL (using Allegro CL 5.0 more than likely) and call
one of these .DLL functions from my C++ program. Can this be done?