On Sat, Aug 21, 2010 at 7:10 PM, R.. Kumar 1.9.1 OSX <sentinel1879 / gmail.com> wrote: > Christoph Kappel wrote: >> ---- On Sat, 21 Aug 2010 08:17:32 +0200 R.. Kumar 1.9.1 OSX wrote ---- >>>Someone told me that STR2CSTR has been removed. Could someone tell me >>>what I should replace STR2CSTR with in the ncurses code, or what to do. >>>I am not familiar with the Ruby-C interface, and would appreciate some >>>pointers. http://github.com/seanohalpin/ffi-ncurses >> >> Actually STR2CSTR was marked as obsolete in 1.8 and removed in 1.9.1. >> >> ruby.h: >> >> /* obsolete API - use StringValue() */ >> char *rb_str2cstr _((VALUE,long*)); >> /* obsolete API - use StringValuePtr() */ >> #define STR2CSTR(x) rb_str2cstr((VALUE)(x),0) >> >> Basically just replace STR2CSTR by StringValuePtr or define this macro. >> >> Wbr >> >> Christoph > > On a fresh copy I placed the above lines, in the ncurse_wrap.h file. > "make" worked, I created a gem and installed the gem. (I placed the > lines above #include <ruby.h> else i get compilation errors.) > > Upon execution of any sample I get: dyld: lazy symbol binding failed: > Symbol not found: _rb_str2cstr > > Perhaps, I am placing these lines in the wrong place. I tried placing in > the .c file but i get the same run time error. > -- > Posted via http://www.ruby-forum.com/. > > -- Michael Fellinger CTO, The Rubyists, LLC I check email a couple times daily; to reach me sooner, use: http://awayfind.com/manveru