From: 7stud -- Date: 2008-03-21T10:55:27+09:00 Subject: Re: extending ruby with C++ 7stud -- wrote: > Michael Neumann wrote: >> 7stud -- wrote: >>>>> $ 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++. > > How? Where? There is no mention of cc in extconf.rb. > >>"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"! >> > > I tried adding that line to extconf.rb before the create_makefile() > line, but I get the same error. > > ?? Here's the error: $ ruby extconf.rb creating Makefile $ make cc -bundle -L"/usr/lib" -o Test.bundle Test.o -lruby -lpthread -ldl -lobjc -lstdc++ /usr/bin/ld: Undefined symbols: __Unwind_Resume collect2: ld returned 1 exit status make: *** [Test.bundle] Error 1 -- Posted via http://www.ruby-forum.com/.