Because of the controversy of using the commercial Visual C++ compiler in
the Windows distribution of Ruby, the following information could prove
useful.
Disclaimer: I’m not trying to push the product - I’m just saying that for
people that do not have access to Visual C++, but want to develop Ruby
extensions on Windows, there may be an opening:
Microsoft Visual C++ .Net Standard Edition is being sold at a recommended
retail price at 109$, seen at Amazon UK priced at £86.
This version is for the hobby programmer and includes a non-optimizing
compiler with a really good debugger / IDE.
I’ve only worked with the professional edition, but I reckon the debugger /
IDE works the same.
I believe you can download the non-optimizing compiler with the .NET SDK,
but then you do not get the debugger (AFAIK), and the download is 100MB+.
If the generated code is too slow, you could always try using the gcc
compiler with mingw, this will also help ensure portability between Windows
/ *nix.
I’d like to know more about how well mingw integrates with the Visual C++
Ruby distribution. My guess is the only significant problem is the
extconf.rb setup, thus it would be nice to be able to choose a compiler
through a switch.
In any case, it is very useful to have the Visual C++ debugger.
I believe you can download the non-optimizing compiler with the .NET SDK,
but then you do not get the debugger (AFAIK), and the download is 100MB+.
A warning: This SDK will not run on Win 95/98/ME.
I’d like to know more about how well mingw integrates with the Visual C++
Ruby distribution. My guess is the only significant problem is the
extconf.rb setup, thus it would be nice to be able to choose a compiler
through a switch.
It would be useful, yes. How would you gather the compiler settings for
the respective other compiler?
In any case, it is very useful to have the Visual C++ debugger.
gdb is also nice…
If you choose the VC++£¬you must choose the windows 2000 or XP.The price of
Windows 2K must be calculated.
Choose ruby, you can program under linux. And the program programming under
linux can work well under windows without modificated.
I like ruby working with TK.It is a good thing that is rather playing than
working.
I’d like to know more about how well mingw integrates with the Visual C++
Ruby distribution.
It is my understanding that one can use either MinGW or Visual C++ to
compile extension modules for the Visual C++ build of Ruby. If that’s
true, and if someone can put together some crystal-clear instructions
about what’s required to pull this off, it should do a lot to quell
people’s fears.
For what it’s worth, while I’ve had to rebuild the .lib files, I’ve
had few problems getting existing C-based extensions compiled with
the free Digital Mars compiler (www.digitalmars.com). It includes a
cl → sc converter, but the cl command line is extremely limited in
size. With some work – and I fear that I’ve misplaced this work,
but I might not have – I was able to come up with the appropriate
sc command-line. This is one reason that I want to see mkmf improved
a bit (I don’t yet have time to work on it) and not necessarily
assume that the builder’s environment is the same as the user’s
environment.
Until I upgraded to the latest version of the 1.7 installer, I was
using rd2 which requires racc. I had compiled racc with the dm
compiler. Unfortunately – and I won’t do this again – I deleted
the racc sources so I lost at least part of my makefile changes.
-austin
– Austin Ziegler, austin@halostatue.ca on 2002.10.25 at 12.21.36
···
On Fri, 25 Oct 2002 20:44:38 +0900, MikkelFJ wrote:
Because of the controversy of using the commercial Visual C++
compiler in the Windows distribution of Ruby, the following
information could prove useful. Disclaimer: I’m not trying to push
the product - I’m just saying that for people that do not have
access to Visual C++, but want to develop Ruby extensions on
Windows, there may be an opening:
From what I understand you can do this. The extensions used to require
different DLLs, but no longer. The new win32 dll is “msvcrt-ruby17.dll”
and is the same for MinGW and VC++. You would have to update the
rbconfig.rb with your compiler/linker settings if you build/deploy ruby
with one compiler and want to use another one. If someone could post a
diff between the mingw generated rbconfig and the vc++ one, that’s all I
think would be necessary.
-rich
···
-----Original Message-----
From: Lyle Johnson [mailto:lyle@users.sourceforge.net]
Sent: Friday, October 25, 2002 9:25 AM
To: ruby-talk ML
Subject: Re: Visual C++ controversy
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
MikkelFJ wrote:
I’d like to know more about how well mingw integrates with
the Visual
C++ Ruby distribution.
It is my understanding that one can use either MinGW or
Visual C++ to compile extension modules for the Visual C++
build of Ruby. If that’s true, and if someone can put
together some crystal-clear instructions about what’s
required to pull this off, it should do a lot to quell
people’s fears. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
“Tobias Peters” tpeters@invalid.uni-oldenburg.de wrote in message
news:Pine.LNX.4.44.0210251337360.28108-100000@localhost.localdomain…
It would be useful, yes. How would you gather the compiler settings for
the respective other compiler?
Don’t know enough about how these configurations work - but I guess you
could at least make a mixed VisualC++ / ming distribution such that the
install would already know everything except possible a path to the
compilers. Or you could make a plugin mycompilerconfig.rb such that you
could add Borland or Watcom plugins to the extend they are compatile. Cygwin
would be different because it’s not binary compatible.
In any case, it is very useful to have the Visual C++ debugger.
gdb is also nice…
On Windows?
Without Cygwin?
I’ve heard about the DDD debugger, but I’ve never tried it.
I’d like to know more about how well mingw integrates with the Visual C++
Ruby distribution.
It is my understanding that one can use either MinGW or Visual C++ to
compile extension modules for the Visual C++ build of Ruby. If that’s
true, and if someone can put together some crystal-clear instructions
about what’s required to pull this off, it should do a lot to quell
people’s fears.
In any case, it is very useful to have the Visual C++ debugger.
gdb is also nice…
On Windows?
Without Cygwin?
Yes!
It ships with the mingw distribution. It even has a click-o-matic
interface (although the first thing I usually do in gdb is to have the gdb
command line displayed).
I’ve heard about the DDD debugger, but I’ve never tried it.
ddd is not a debugger, but a GUI for gdb and I think some other debugger.
I don’t know if it works on windows.
I’d like to know more about how well mingw integrates with the
Visual C++ Ruby distribution.
It is my understanding that one can use either MinGW or Visual C++
to compile extension modules for the Visual C++ build of Ruby. If
that’s true, and if someone can put together some crystal-clear
instructions about what’s required to pull this off, it should do a
lot to quell people’s fears.
This is allegedly the case in Ruby 1.7, not 1.6.
Doesn’t appear to work, in my case. I have extensions that work
fine when compiled and installed on 1.7.2 mswin or when compiled
and installed under 1.7.3 mingw. It core dumps (that’s the message)
if I used the mingw produced Lib.so shared library with the mswin
distribution.
Perhaps it is the dot release. More likely it is the config file/dll
setup that Rich mentioned.
From what I understand you can do this. The extensions used to require
different DLLs, but no longer. The new win32 dll is “msvcrt-ruby17.dll”
and is the same for MinGW and VC++.
I see you are refering to ruby-1.7. This is not true for ruby-1.6.7:
I just built ruby-1.6.7 with both compilers. the dll created by msvc6
is named “mswin32-ruby16.dll”. Mingw creates a statically linked
“ruby.exe”, and the ruby library it creates is called
“libmingw32-ruby16.a”.
You would have to update the
rbconfig.rb with your compiler/linker settings if you build/deploy ruby
with one compiler and want to use another one. If someone could post a
diff between the mingw generated rbconfig and the vc++ one, that’s all I
think would be necessary.
If it helps anyone, here are the two rbconfig.rb files for ruby-1.6.7.
MinGW-2.0.0-3 / MSYS-1.0.8-2002.09.07-1:
···
========================================
module Config
RUBY_VERSION == “1.6.7” or
raise “ruby lib version (1.6.7) doesn’t match executable version (#{RUBY_VERSION})”
This file was created by configrb when ruby was built. Any changes
made to this file will be lost the next time ruby is built.