On Thursday, 10 June 2004 at 3:08:40 +0900, Tim Hunter wrote: > On Thu, 10 Jun 2004 01:13:00 +0900, Jim Freeze <jim / freeze.org> wrote: > > >Hi > > > > gcc -fPIC -O2 -g -pipe -Wall -fPIC -I. > > -I/usr/lib64/ruby/1.8/x86_64-linux-gnu > > -I/usr/lib64/ruby/1.8/x86_64-linux-gnu -I. -c netlistparser.c > > netlistparser.c: In function `Init_netlistparser': > > netlistparser.c:113: warning: implicit declaration of function > > `rb_reg_regcomp' > > gcc -shared -L"/usr/lib64" -o netlistparser.so netlistparser.o -lruby > > -ldl -lcrypt -lm -lc > > Almost certainly the actual function definition doesn't match with the > defaults used by the compiler in the absence of a prototype. I don't > have access to the ruby source here but my guess is that > rb_reg_regcomp actually uses/returns a 64-bit value but the compiler > assumed a 32-bit value. When you execute the .so, rb_reg_regcomp puts > a 64-bit value on the stack but the caller only takes a 32-bit value > off. Boom. Adding the include file makes the prototype available to > the compiler. Should this be fixed in ruby.h? -- Jim Freeze Ours is a world of nuclear giants and ethical infants. -- General Omar N. Bradley