From: Michael Neumann Date: 2008-03-21T10:30:23+09:00 Subject: Re: extending ruby with C++ 7stud -- wrote: > Thanks for the response. > > Michael Neumann wrote: >> 7stud -- wrote: >>> I'm using this old (2001) mini tutorial: >>> >>> http://www.angelfire.com/electronic2/issac/rb_cpp_ext_tut.txt >>> >>> When I run make, I get this error: >>> >>> $ make >>> cc -bundle -L"/usr/lib" -o Test.bundle Test.o -lruby -lpthread -ldl >>> -lobjc >> use c++ or add -lstdc++. >> > > I don't know what that means. "cc" is usually used to compile C programs. Use the command-line tool "c++" (or "g++") instead for C++. "cc" will determine that you are compiling C++ code, but it will not add the standard C++ library (-lstdc++). Add the following line to your extconf.rb file: $LIBS << " -lstdc++" Before the call to "create_makefile"! Regards, Michael