[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Compiling Extensions on Windows

Jim Weirich

10/25/2004 5:10:00 PM

I need to compile some ruby extensions on a windows box. Although I've
done this on Linux hundreds of times, I'm not setup for developement on
the windows box nor am I very familiar with windows development. What do
I need on windows to build ruby C extensions that are compatible with the
one click installer?

Thanks.


--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)



10 Answers

Joel VanderWerf

10/25/2004 5:33:00 PM

0

Jim Weirich wrote:
> I need to compile some ruby extensions on a windows box. Although I've
> done this on Linux hundreds of times, I'm not setup for developement on
> the windows box nor am I very familiar with windows development. What do
> I need on windows to build ruby C extensions that are compatible with the
> one click installer?
>
> Thanks.
>
>

You can install MSVC:

http://msdn.microsoft.com/visualc/vcto...

and then:

- run extconf.rb as usual, and

- use nmake instead of make.

Or you can use mingw, if you prefer (or demand) gcc. I've found mingw
output to be compatible with the one-click ruby.


Joey Gibson

10/25/2004 5:46:00 PM

0

Joel VanderWerf wrote:

> Jim Weirich wrote:
>
>> I need to compile some ruby extensions on a windows box. Although I've
>> done this on Linux hundreds of times, I'm not setup for developement on
>> the windows box nor am I very familiar with windows development.
>> What do
>> I need on windows to build ruby C extensions that are compatible with
>> the
>> one click installer?
>>
>> Thanks.
>>
>>
>
> You can install MSVC:
>
> http://msdn.microsoft.com/visualc/vcto...


Have you actually gotten that to work? I tried building some stuff with
that compiler when it came out, but because they got rid of the 'lib'
program, the build failed. Maybe they've added it back in or changed
things, but I had to drop back to MSVC6 to get ruby stuff to compile.


--
She drove a Plymouth Satellite
Faster than the Speed of Light...

http://www.joeygibso...
http://www.joeygibso.../life/Wisdom.html
Atlanta Ruby User Group http://www....




Joel VanderWerf

10/25/2004 5:51:00 PM

0

Joey Gibson wrote:
> Joel VanderWerf wrote:
>
>> Jim Weirich wrote:
>>
>>> I need to compile some ruby extensions on a windows box. Although I've
>>> done this on Linux hundreds of times, I'm not setup for developement on
>>> the windows box nor am I very familiar with windows development.
>>> What do
>>> I need on windows to build ruby C extensions that are compatible with
>>> the
>>> one click installer?
>>>
>>> Thanks.
>>>
>>>
>>
>> You can install MSVC:
>>
>> http://msdn.microsoft.com/visualc/vcto...
>
>
>
> Have you actually gotten that to work? I tried building some stuff with
> that compiler when it came out, but because they got rid of the 'lib'
> program, the build failed. Maybe they've added it back in or changed
> things, but I had to drop back to MSVC6 to get ruby stuff to compile.

It worked for the few extensions I built. Can't remember now which
ones... I'll check next time I boot into windows.

Which ones did you try?


Joey Gibson

10/25/2004 5:55:00 PM

0

Joel VanderWerf wrote:

> It worked for the few extensions I built. Can't remember now which
> ones... I'll check next time I boot into windows.
>
> Which ones did you try?


I'm trying to remember. I'm thinking it may have been Ruby itself. It
was quite some time ago.


--
She drove a Plymouth Satellite
Faster than the Speed of Light...

http://www.joeygibso...
http://www.joeygibso.../life/Wisdom.html
Atlanta Ruby User Group http://www....




Curt Hibbs

10/25/2004 6:03:00 PM

0

Joel VanderWerf wrote:
>
> Jim Weirich wrote:
> > I need to compile some ruby extensions on a windows box. Although I've
> > done this on Linux hundreds of times, I'm not setup for developement on
> > the windows box nor am I very familiar with windows
> development. What do
> > I need on windows to build ruby C extensions that are
> compatible with the
> > one click installer?
> >
> > Thanks.
> >
> >
>
> You can install MSVC:
>
> http://msdn.microsoft.com/visualc/vcto...
>
> and then:
>
> - run extconf.rb as usual, and
>
> - use nmake instead of make.
>
> Or you can use mingw, if you prefer (or demand) gcc. I've found mingw
> output to be compatible with the one-click ruby.

I am probably wrong here, so please correct me...

I seem to recall trying out this free msvc toolkit about 6 to 9 months ago,
and after I installed it I couldn't find nmake anywhere. The compiler would
be pretty useless without nmake, so someone please tell me that I did
something wrong.

Curt



Wayne Chin

10/25/2004 6:18:00 PM

0

Shashank Date

10/25/2004 6:36:00 PM

0


--- Curt Hibbs <curt@hibbs.com> wrote:

> I seem to recall trying out this free msvc toolkit
> about 6 to 9 months ago,
> and after I installed it I couldn't find nmake
> anywhere. The compiler would
> be pretty useless without nmake, so someone please
> tell me that I did
> something wrong.

You downloaded only the toolkit. You should also
download the FrameWork SDK (free ;-)

http://msdn.microsoft.com/netframework/downloads/framework1_1...

I have downloaded both and nmake is there, under:

------
C:\Program Files\Microsoft.NET>dir nmake*.* /s
Volume in drive C is LOCAL
Volume Serial Number is AC53-D8CC

Directory of C:\Program
Files\Microsoft.NET\SDK\v1.1\Bin

03/18/2003 08:38p 81,920 nmake.exe
1 File(s) 81,920 bytes

C:\Program Files\Microsoft.NET>
-----

> Curt

-- shanko



_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote...


Curt Hibbs

10/25/2004 6:54:00 PM

0

Shashank Date wrote:
>
> --- Curt Hibbs <curt@hibbs.com> wrote:
>
> > I seem to recall trying out this free msvc toolkit
> > about 6 to 9 months ago,
> > and after I installed it I couldn't find nmake
> > anywhere. The compiler would
> > be pretty useless without nmake, so someone please
> > tell me that I did
> > something wrong.
>
> You downloaded only the toolkit. You should also
> download the FrameWork SDK (free ;-)
>
> http://msdn.microsoft.com/netframework/downloads/framework1_1...

Thanks, I knew I must have missed something!

Even though I have the paid version of vc++ I would prefer to compile the
one-click installer with a version that is free to everyone. I'll give this
a try and update the read-me instructions for those who want to build the
installer themselves.

Curt



Shashank Date

10/25/2004 7:38:00 PM

0

Hi,

--- Curt Hibbs <curt@hibbs.com> wrote:

> I'll give this a try and update the read-me
> instructions for those who want to build the
> installer themselves.

In that case, take a look at this:

http://csp.sourceforge.net/wiki/FreeVi...

> Curt

HTH,
-- shanko



_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote...


Justin Rudd

10/25/2004 7:51:00 PM

0

I've used both MinGW and Visual Studio.NET 7.1 (or 2003) successfully.
I tend to use Visual Studio.NET more than MinGW. Mainly because of
familiarity. I haven't tried the VC++ Express edition that you can
get for free from MS. But it should work because it comes with full
headers to CRT, STL, etc.

There are a couple of other suggestions about using the Framework SDK.
This is the .NET Framework. And while it does come with cl, link,
and nmake. It comes with a bare minimum of header files. And the
header files it does come with are mostly for integrating with .NET.
There is no STL or CRT. So it might not work out of the box building
Ruby (or other extensions).

Also there is a link to NMAKE 1.5. This is the 16 bit NMAKE. I
wouldn't recommend trying to use it.

--
Justin Rudd
http://seagecko.org...

On Tue, 26 Oct 2004 02:09:45 +0900, Jim Weirich <jim@weirichhouse.org> wrote:
> I need to compile some ruby extensions on a windows box. Although I've
> done this on Linux hundreds of times, I'm not setup for developement on
> the windows box nor am I very familiar with windows development. What do
> I need on windows to build ruby C extensions that are compatible with the
> one click installer?
>
> Thanks.
>
>
> --
> -- Jim Weirich jim@weirichhouse.org http://onest...
> -----------------------------------------------------------------
> "Beware of bugs in the above code; I have only proved it correct,
> not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
>
>