Generating config.h on Windows

I’m having trouble generating config.h on one of my machines, and I
don’t remember the exact steps I’ve used in the past. I install with
the One-Click Installer, open up a MSVC (Express Edition)
command-prompt, and goto the following directory:

c:\ruby\src\ruby-1.8.5\win32

Then I run configure.bat, which says that “cl” returned a U1077,
without any detail on line-number, file, or any other specifics.

Are there are include directories I need to add to my %PATH%
environment variable or anything? I don’t need to build Ruby, just
generate the config.h for c-extensions.

Thanks,
-Sam

Sam S. wrote:

I’m having trouble generating config.h on one of my machines, and I
don’t remember the exact steps I’ve used in the past. I install with
the One-Click Installer, open up a MSVC (Express Edition)
command-prompt, and goto the following directory:

c:\ruby\src\ruby-1.8.5\win32

Then I run configure.bat, which says that “cl” returned a U1077,
without any detail on line-number, file, or any other specifics.

This is what the README.win32 says:

== How to compile and install

(1) Execute win32\configure.bat on your build directory.
You can specify the target platform as an argument.
For example, run `((%configure i686-mswin32%))’

So, I think you just have to run the batch file from the main ruby dir.
In your case:

cd c:\ruby\src\ruby-1.8.5
win32\configure.bat

I’m not on windows now to test it, but I think this has worked for me…

Thanks Joel, but I could swear I’ve tried that after seeing the same
thing in the README and thinking I had found the solution. :slight_smile:

I’d like to be able to say absolutely that doesn’t solve it, but I
don’t have the affected machine in front of me right now. Still,
running configure.bat straight from the win32 folder works fine on the
machine I’m on right now, so I’m fairly certain that’s not what’s
wrong.

Thanks,
-Sam

Hi,

At Tue, 16 Jan 2007 05:40:33 +0900,
Sam S. wrote in [ruby-talk:234174]:

I’m having trouble generating config.h on one of my machines, and I
don’t remember the exact steps I’ve used in the past. I install with
the One-Click Installer, open up a MSVC (Express Edition)
command-prompt, and goto the following directory:

c:\ruby\src\ruby-1.8.5\win32

Or you can make a new directory and run configure.bat there.

c:\ruby\src\ruby-1.8.5> mkdir i386-mswin32
c:\ruby\src\ruby-1.8.5> chdir i386-mswin32
c:\ruby\src\ruby-1.8.5\i386-mswin32> …\win32\configure.bat

Then I run configure.bat, which says that “cl” returned a U1077,
without any detail on line-number, file, or any other specifics.

U1077 should be an error from nmake.exe.

Are there are include directories I need to add to my %PATH%
environment variable or anything? I don’t need to build Ruby, just
generate the config.h for c-extensions.

%INCLUDE% and %LIB% will be set by a batch file installed with
VC. But the config.h generated by MSVC8 cannot be used with
One-Click Installer which is compiled with MSVC6.