From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2002-10-15T21:40:47+09:00 Subject: Re: extensions in C++ (iostream) Kent Dahl wrote: > Simon Strandgaard wrote: > > cc -shared -Wl,-soname,Test.so -L/usr/local/lib -o Test.so test.o -L. -lruby -lc > > Doesn't look like you are linking in the C++ standard library > explicitly. > To my knowledge, cc doesn't do that implicitly. I think the switch is > -lstdc++ but I am not sure as I usually use the CXX (such as g++) > instead of CC for the linking, and I think that g++ links to the C++ > library implicitly. ruby/ext> g++ -shared -Wl,-soname,Test.so -L/usr/local/lib -o Test.so test.o -L. -lruby -lc ruby/ext> ruby test.rb test name=hello world ruby/ext> It works... thanks I would like to do this (in a nice way) from inside "extconf.rb" but how? regards Simon Strandgaard