From: 7stud -- Date: 2008-03-22T02:33:41+09:00 Subject: Re: extending ruby with C++ Michael Neumann wrote: > 7stud -- wrote: >> 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 > > Try this: > > $LIBS << " -lstdc++ -lc" > > Regards, > > Michael Here is my current extconf.rb: -------- require 'mkmf' if (/mswin32/ =~ PLATFORM) $CFLAGS+=" -GX " # allow exceptions end $LIBS << " -lstdc++ -lc" create_makefile("Test") -------- Here is the result: $ ruby extconf.rb creating Makefile $ make cc -bundle -L"/usr/lib" -o Test.bundle Test.o -lruby -lpthread -ldl -lobjc -lstdc++ -lc /usr/bin/ld: Undefined symbols: __Unwind_Resume collect2: ld returned 1 exit status make: *** [Test.bundle] Error 1 $ls Makefile Test.cpp Test.o extconf.rb -- Posted via http://www.ruby-forum.com/.