As an experiment I am trying to write a Ruby extension in C++ instead of C.

I started with a working C extension file, changed the suffix from .c to .C,
wrapped the subroutine declarations with extern "C", and changed some of my
C library calls to use the C++ library.  Next, I ran my extconf.rb file
followed by make.  Everything seemed to work okay, except that when I tried
a small test case, my program crashed with a segmentation fault.  Stepping
through a debugger showed that the segmentation fault occurred when the ruby
extension called a C++ library routine (specifically, std::ifstream).

Both ruby and my extension were compiled with gcc, so I was hoping that this
would work.  Are there any technical problems with trying to use a C++
source file to create an extension, or have I just not stumbled across the
right incantations to make everything work?

Thanks,

Brett Denner

-- 
 Brett W. Denner                    Lockheed Martin Aeronautics Co.
 email: Brett.W.Denner / lmco.com     PO Box 748, MZ 9332
 phone: 817-935-1144                Fort Worth, TX 76101
 fax:   817-935-1212