Forum: Ruby Compile Ruby9i on Windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C06869c119472a139eb163b72040b0db?d=identicon&s=25 Bertram Scharpf (Guest)
on 2006-01-14 17:41
(Received via mailing list)
Hi,

in my company we use Oracle and Windows :-(.

Now, I would like at least to start for some quick-and-dirty
solutions to use Ruby. Maybe my boss could be convinced it's
worth a closer look.

I'm afraid, I don't succeed to compile the
<http://ruby9i.sourceforge.net/> library at all. I get loads
of errors the more I try. I easily managed to compile my own
OCI (Oracle from C) programs with MSVC (by the way: C
plugins, too).

I would build a project file of my own but as I see the Ruby
installation includes ".so" files. I don't know what
restrictions to use to build DLLs that can be renamed to
that type.

Could anyone please give me a short description of what is
to do?

Thanks in advance,

Bertram
430ea1cba106cc65b7687d66e9df4f06?d=identicon&s=25 David Vallner (Guest)
on 2006-01-14 20:07
(Received via mailing list)
On Sat, 14 Jan 2006 17:38:19 +0100, Bertram Scharpf
<lists@bertram-scharpf.de> wrote:

> of errors the more I try. I easily managed to compile my own
>
> Thanks in advance,
>
> Bertram
>
>


A .so is a .dll. They're compiled basically the same way, just remember
to
export the Init_* functions. (Or for qnd jobs, export all functions, you
can always optimize later). If you have the time, you might want to give
the file "rbconfig.rb" a read, pretty much everything the extension
configuration scripts use is there.

Also, a little bit of POSIX goes a long way. A lot of Makefile
generators
count on you using a sh-compatible shell, POSIX CLI tools, and gcc
compiler flags. You might try switching to a cygwin or mingw build of
ruby
if you plan to use extensions a lot.

David Vallner
25e11a00a89683f7e01e425a1a6e305c?d=identicon&s=25 Wilson Bilkovich (Guest)
on 2006-01-16 00:48
(Received via mailing list)
On 1/14/06, Bertram Scharpf <lists@bertram-scharpf.de> wrote:
> of errors the more I try. I easily managed to compile my own
>
> Thanks in advance,
>
> Bertram
>
I only tried to make Ruby9i work for a short time, before deciding
that the Ruby-oci8 interface was more recently maintained, and more
popular:
http://www.jiubao.org/ruby-oci8/
I'm using this (on Windows and otherwise) for a number of production
tasks and Rails systems, and it works well.  Conveniently, it also has
a binary download for Windows, so you won't need to compile anything.
C06869c119472a139eb163b72040b0db?d=identicon&s=25 Bertram Scharpf (Guest)
on 2006-01-16 19:20
(Received via mailing list)
Hi,

Am Sonntag, 15. Jan 2006, 04:05:56 +0900 schrieb David Vallner:
>
> A .so is a .dll. They're compiled basically the same way, just remember to
> export the Init_* functions. (Or for qnd jobs, export all functions, you
> can always optimize later). If you have the time, you might want to give
> the file "rbconfig.rb" a read, pretty much everything the extension
> configuration scripts use is there.

Phew, I had to edit all the source files and put the
variable declarations in front of the statements.

Now it compiles and works great. Thank you!

> You might try switching to a cygwin or mingw build of ruby
> if you plan to use extensions a lot.

That will be the next step ...

Bertram
430ea1cba106cc65b7687d66e9df4f06?d=identicon&s=25 David Vallner (Guest)
on 2006-01-16 20:26
(Received via mailing list)
On Mon, 16 Jan 2006 19:19:19 +0100, Bertram Scharpf
<lists@bertram-scharpf.de> wrote:

>> >of errors the more I try. I easily managed to compile my own
> Phew, I had to edit all the source files and put the
> variable declarations in front of the statements.

Oh dear. Someone dared to forget to code in that bleeding-edge
experimental new shiny C99 </sarcasm>.

Arguably the thing I hated most about C. *mutters about Borland Turbo C
colleges*

>
> Now it compiles and works great. Thank you!
>

Hoolay! If that was all that was needed, you're lucky, I can't get even
"nonsense" like iconv and fastcgi to build out of the box.

David Vallner
This topic is locked and can not be replied to.