Hi Marc,
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. 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. I assume it's about some linking settings but I have to investigate more.
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. I'll recompile the runtime and try again.
Thanks, Dan.
-----Original Message----- From: Marc Feeley [mailto:feeley@IRO.UMontreal.CA] Sent: Monday, February 21, 2005 5:55 PM To: dhristodorescu@borderfree.com Cc: gambit-list@IRO.UMontreal.CA Subject: Re: [gambit-list] Linking to C++ problems
Sorry to replay to my own message but I figure out what was the = problem. It was just the mangling of DLL exported symbols (I was referring a = wrong name); it works fine now.
Great.
The only relevant part of the message that remains is the one about the extern "C" generation.
I don't understand your point here. You should either compile the whole Gambit runtime system and your program with a C compiler, or with a C++ compiler, and then the names will be mangled appropriately. Are you mixing C and C++ code? (this is a bad idea in general because of the way exceptions are handled....)
Marc
Afficher les réponses par date