<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Using the Foreign Language Interface.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=2>I'm having issues with the Foreign Language Libraries and using them to get at some C++ functions. Essentially my scheme program wants to pass a string to a C++ function that has this signature: double Value_Of_Expr(const string &amp;Expr). I compiled the C++ progame into a DLL using g++ using this: g++ -shared -o fn.dll fn.cpp, but Im not sure if this is correct, it's just what some help website said to do, but I don't know if it is doing it correctly or not. I then try to load the created dll using schemes foreign language library functions: (ffi-lib fn.dll), but this crashes scheme and I have to manually shut down the program. I have tried loading the Value_of_Expr() function using (get-ffi-obj) but the documentation on the docs is lost on me, I can't follow it.<BR>
<BR>
Can anyone help me solve this issue?<BR>
<BR>
To state it hopefully a bit more clearly:<BR>
I am trying to interact with a dll I compiled using g++ -shared -o fn.dll fn.cpp.<BR>
I need to get at the double Value_Of_Expr(const string &amp;Expr) function inside that file and pass it a string from scheme.<BR>
I then need to retrieve a returned number from the function.<BR>
I am unsure how to do any of this really &gt;&lt;<BR>
<BR>
~Steve Z</FONT>
</P>

</BODY>
</HTML>