<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [gambit-list] Linking to C++ problems</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi Marc,</FONT>
</P>

<P><FONT SIZE=2>The problem I had in my test program was because I was compiling the DLL with -D___DYNAMIC. Without this flag the test program was fine.</FONT></P>

<P><FONT SIZE=2>The real program I use still crashes and I have to figure out why. It works fine without the actual call to the scheme method; Gambit initialization doesn't cause any problems.</FONT></P>

<P><FONT SIZE=2>I assume it's about some linking settings but I have to investigate more.</FONT>
</P>

<P><FONT SIZE=2>I see your point about using the C++ compiler. I was using Gambit compiled by the default configure script which probably uses the C compiler and that's why I was mixing C with C++. Thanks for clearing that out for me.</FONT></P>

<P><FONT SIZE=2>I'll recompile the runtime and try again.</FONT>
</P>

<P><FONT SIZE=2>Thanks,</FONT>
<BR><FONT SIZE=2>Dan.</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Marc Feeley [<A HREF="mailto:feeley@IRO.UMontreal.CA">mailto:feeley@IRO.UMontreal.CA</A>] </FONT>
<BR><FONT SIZE=2>Sent: Monday, February 21, 2005 5:55 PM</FONT>
<BR><FONT SIZE=2>To: dhristodorescu@borderfree.com</FONT>
<BR><FONT SIZE=2>Cc: gambit-list@IRO.UMontreal.CA</FONT>
<BR><FONT SIZE=2>Subject: Re: [gambit-list] Linking to C++ problems</FONT>
</P>

<P><FONT SIZE=2>> Sorry to replay to my own message but I figure out what was the =</FONT>
<BR><FONT SIZE=2>> problem.</FONT>
<BR><FONT SIZE=2>> It was just the mangling of DLL exported symbols (I was referring a =</FONT>
<BR><FONT SIZE=2>> wrong</FONT>
<BR><FONT SIZE=2>> name); it works fine now.</FONT>
</P>

<P><FONT SIZE=2>Great.</FONT>
</P>

<P><FONT SIZE=2>> The only relevant part of the message that remains is the one about the</FONT>
<BR><FONT SIZE=2>> extern "C" generation.</FONT>
</P>

<P><FONT SIZE=2>I don't understand your point here.  You should either compile</FONT>
<BR><FONT SIZE=2>the whole Gambit runtime system and your program with a C</FONT>
<BR><FONT SIZE=2>compiler, or with a C++ compiler, and then the names will be</FONT>
<BR><FONT SIZE=2>mangled appropriately.  Are you mixing C and C++ code?  (this is</FONT>
<BR><FONT SIZE=2>a bad idea in general because of the way exceptions are handled....)</FONT>
</P>

<P><FONT SIZE=2>Marc</FONT>
</P>

</BODY>
</HTML>