From: Leslie Viljoen Date: 2007-04-26T17:28:33+09:00 Subject: Re: C++ code into Ruby, I need it fast, no time for RTFM On 4/25/07, Tim Pease wrote: > On 4/25/07, Andrei Ursan wrote: > > > > Strings value are read from the keyboard, and i need a getch and clrscr > > method. > > And how can I export the ruby code into *.exe ? > > > > Can somebody translate this into ruby ? I need it fast... > > > > Have you gotten a suitable answer yet? > > There are several options for you here. > 1) Transliterate into Ruby (as you imply) > 2) Leave your code as-is and wrapper it using Ruby's C api > 3) Leave your code as-is and use the Ruby DL module to load your > library and invoke the methods > 4) Use the RubyInline module to simply "inline" your C/C++ code into a > Ruby program Just tried RubyInline - amazing! I had one GCC hiccough on my Ubuntu 6 system, I had to do this: ln -s /usr/lib/gcc/x86_64-linux-gnu/4.0.3/cc1 /usr/bin/cc1plus ..to get GCC to recognise that G++ had been installed. Otherwise it gave me this: gcc: installation problem, cannot exec `cc1plus': No such file or directory