HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/share/doc/ruby/html/win32/README_win32.html
<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">

<title>README.win32 - RDoc Documentation</title>

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
</script>

<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<link href="../css/fonts.css" rel="stylesheet">
<link href="../css/rdoc.css" rel="stylesheet">




<body id="top" role="document" class="file">
<nav role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="../index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  
<div class="nav-section">
  <h3>Table of Contents</h3>

  <ul class="link-list" role="directory">
    <li><a href="#label-How+to+build+ruby+using+Visual+C-2B-2B">How to build ruby using Visual C++</a>
    <li><a href="#label-Requirement">Requirement</a>
    <li><a href="#label-How+to+compile+and+install">How to compile and install</a>
    <li><a href="#label-Icons">Icons</a>
    <li><a href="#label-Build+examples">Build examples</a>
    <li><a href="#label-Bugs">Bugs</a>
  </ul>
</div>


  <div id="project-metadata">
    <div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
  
    <li><a href="../CONTRIBUTING_md.html">CONTRIBUTING</a>
  
    <li><a href="../COPYING.html">COPYING</a>
  
    <li><a href="../COPYING_ja.html">COPYING.ja</a>
  
    <li><a href="../LEGAL.html">LEGAL</a>
  
    <li><a href="../NEWS.html">NEWS</a>
  
    <li><a href="../NEWS-1_8_7.html">NEWS-1.8.7</a>
  
    <li><a href="../NEWS-1_9_1.html">NEWS-1.9.1</a>
  
    <li><a href="../NEWS-1_9_2.html">NEWS-1.9.2</a>
  
    <li><a href="../NEWS-1_9_3.html">NEWS-1.9.3</a>
  
    <li><a href="../NEWS-2_0_0.html">NEWS-2.0.0</a>
  
    <li><a href="../NEWS-2_1_0.html">NEWS-2.1.0</a>
  
    <li><a href="../NEWS-2_2_0.html">NEWS-2.2.0</a>
  
    <li><a href="../NEWS-2_3_0.html">NEWS-2.3.0</a>
  
    <li><a href="../NEWS-2_4_0.html">NEWS-2.4.0</a>
  
    <li><a href="../NEWS-2_5_0.html">NEWS-2.5.0</a>
  
    <li><a href="../NEWS-2_6_0.html">NEWS-2.6.0</a>
  
    <li><a href="../README_ja_md.html">README.ja</a>
  
    <li><a href="../README_md.html">README</a>
  
    <li><a href="../bug_triaging_rdoc.html">bug_triaging</a>
  
    <li><a href="../contributing_rdoc.html">contributing</a>
  
    <li><a href="../contributors_rdoc.html">contributors</a>
  
    <li><a href="../dtrace_probes_rdoc.html">dtrace_probes</a>
  
    <li><a href="../extension_ja_rdoc.html">extension.ja</a>
  
    <li><a href="../extension_rdoc.html">extension</a>
  
    <li><a href="../globals_rdoc.html">globals</a>
  
    <li><a href="../keywords_rdoc.html">keywords</a>
  
    <li><a href="../lib/racc/pre-setup.html">pre-setup</a>
  
    <li><a href="../lib/racc/rdoc/grammar_en_rdoc.html">grammar.en</a>
  
    <li><a href="../maintainers_rdoc.html">maintainers</a>
  
    <li><a href="../marshal_rdoc.html">marshal</a>
  
    <li><a href="../regexp_rdoc.html">regexp</a>
  
    <li><a href="../security_rdoc.html">security</a>
  
    <li><a href="../signals_rdoc.html">signals</a>
  
    <li><a href="../standard_library_rdoc.html">standard_library</a>
  
    <li><a href="../syntax_rdoc.html">syntax</a>
  
    <li><a href="../syntax/assignment_rdoc.html">assignment</a>
  
    <li><a href="../syntax/calling_methods_rdoc.html">calling_methods</a>
  
    <li><a href="../syntax/comments_rdoc.html">comments</a>
  
    <li><a href="../syntax/control_expressions_rdoc.html">control_expressions</a>
  
    <li><a href="../syntax/exceptions_rdoc.html">exceptions</a>
  
    <li><a href="../syntax/literals_rdoc.html">literals</a>
  
    <li><a href="../syntax/methods_rdoc.html">methods</a>
  
    <li><a href="../syntax/miscellaneous_rdoc.html">miscellaneous</a>
  
    <li><a href="../syntax/modules_and_classes_rdoc.html">modules_and_classes</a>
  
    <li><a href="../syntax/precedence_rdoc.html">precedence</a>
  
    <li><a href="../syntax/refinements_rdoc.html">refinements</a>
  
    <li><a href="../win32/README_win32.html">README.win32</a>
  
  </ul>
</div>

  </div>
</nav>

<main role="main" aria-label="Page win32/README.win32">

<h1 id="label-How+to+build+ruby+using+Visual+C-2B-2B">How to build ruby using Visual C++<span><a href="#label-How+to+build+ruby+using+Visual+C-2B-2B">&para;</a> <a href="#top">&uarr;</a></span></h1>

<h2 id="label-Requirement">Requirement<span><a href="#label-Requirement">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ol><li>
<p>Windows 7 or later.</p>
</li><li>
<p>Visual C++ 12.0 (2013) or later.</p>
<dl class="rdoc-list label-list"><dt>Note
<dd>
<p>if you want to build x64 version, use native compiler for x64.</p>
</dd></dl>
</li><li>
<p>Please set environment variable <code>INCLUDE</code>, <code>LIB</code>, <code>PATH</code> to run required commands properly from the command line.</p>
<dl class="rdoc-list label-list"><dt>Note
<dd>
<p>building ruby requires following commands.</p>
</dd></dl>
<ul><li>
<p>nmake</p>
</li><li>
<p>cl</p>
</li><li>
<p>ml</p>
</li><li>
<p>lib</p>
</li><li>
<p>dumpbin</p>
</li></ul>
</li><li>
<p>If you want to build from GIT source, following commands are required.</p>
<ul><li>
<p>bison</p>
</li><li>
<p>patch</p>
</li><li>
<p>sed</p>
</li><li>
<p>ruby 2.0 or later</p>
</li></ul>
</li><li>
<p>Enable Command Extension of your command line.  It&#39;s the default behavior of <code>cmd.exe</code>.  If you want to enable it explicitly, run <code>cmd.exe</code> with <code>/E:ON</code> option.</p>
</li></ol>

<h2 id="label-How+to+compile+and+install">How to compile and install<span><a href="#label-How+to+compile+and+install">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ol><li>
<p>Execute <code>win32\configure.bat</code> on your build directory. You can specify the target platform as an argument. For example, run `<code>configure --target=i686-mswin32</code>&#39; You can also specify the install directory. For example, run `<code>configure --prefix=&lt;install_directory&gt;</code>&#39; Default of the install directory is <code>/usr</code> . The default <em>PLATFORM</em> is `<code>i386-mswin32_</code><em>MSRTVERSION</em>&#39; on 32-bit platforms, or `<code>x64-mswin64_</code><em>MSRTVERSION</em>&#39; on x64 platforms. <em>MSRTVERSION</em> is the 2- or 3-digits version of the Microsoft Runtime Library.</p>
</li><li>
<p>Change <em>RUBY_INSTALL_NAME</em> and <em>RUBY_SO_NAME</em> in <code>Makefile</code> if you want to change the name of the executable files. And add <em>RUBYW_INSTALL_NAME</em> to change the name of the executable without console window if also you want.</p>
</li><li>
<p>Run `<code>nmake up</code>&#39; if you are building from GIT source.</p>
</li><li>
<p>Run `<code>nmake</code>&#39;</p>
</li><li>
<p>Run `<code>nmake check</code>&#39;</p>
</li><li>
<p>Run `<code>nmake install</code>&#39;</p>
</li></ol>

<h2 id="label-Icons">Icons<span><a href="#label-Icons">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>Any icon files(*.ico) in the build directory, directories specified with <em>icondirs</em> make variable and <code>win32</code> directory under the ruby source directory will be included in DLL or executable files, according to their base names.</p>

<pre>$(RUBY_INSTALL_NAME).ico or ruby.ico   --&gt; $(RUBY_INSTALL_NAME).exe
$(RUBYW_INSTALL_NAME).ico or rubyw.ico --&gt; $(RUBYW_INSTALL_NAME).exe
the others                             --&gt; $(RUBY_SO_NAME).dll</pre>

<p>Although no icons are distributed with the ruby source, you can use anything you like. You will be able to find many images by search engines. For example, followings are made from <a href="https://cache.ruby-lang.org/pub/misc/logo/ruby-logo-kit.zip">Ruby logo kit</a>:</p>
<ul><li>
<p>Small <a href="https://www.ruby-lang.org/favicon.ico">favicon</a> in the official site</p>
</li><li>
<p><a href="http://ruby.morphball.net/vit-ruby-ico_en.html">ruby.morphball.net/vit-ruby-ico_en.html</a> or <a href="http://ruby.morphball.net/icon/vit-ruby.ico">icon itself</a></p>
</li></ul>

<h2 id="label-Build+examples">Build examples<span><a href="#label-Build+examples">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>Build on the ruby source directory.</p>

<p>ex.)</p>

<pre>ruby source directory:  C:\ruby
build directory:        C:\ruby
install directory:      C:\usr\local

C:
cd \ruby
win32\configure --prefix=/usr/local
nmake
nmake check
nmake install</pre>
</li><li>
<p>Build on the relative directory from the ruby source directory.</p>

<p>ex.)</p>

<pre>ruby source directory:  C:\ruby
build directory:        C:\ruby\mswin32
install directory:      C:\usr\local

C:
cd \ruby
mkdir mswin32
cd mswin32
..\win32\configure --prefix=/usr/local
nmake
nmake check
nmake install</pre>
</li><li>
<p>Build on the different drive.</p>

<p>ex.)</p>

<pre>ruby source directory:  C:\src\ruby
build directory:        D:\build\ruby
install directory:      C:\usr\local

D:
cd D:\build\ruby
C:\src\ruby\win32\configure --prefix=/usr/local
nmake
nmake check
nmake install DESTDIR=C:</pre>
</li><li>
<p>Build x64 version (requires native x64 VC++ compiler)</p>

<p>ex.)</p>

<pre>ruby source directory:  C:\ruby
build directory:        C:\ruby
install directory:      C:\usr\local

C:
cd \ruby
win32\configure --prefix=/usr/local --target=x64-mswin64
nmake
nmake check
nmake install</pre>
</li></ul>

<h2 id="label-Bugs">Bugs<span><a href="#label-Bugs">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>You can <strong>NOT</strong> use a path name that contains any white space characters as the ruby source directory, this restriction comes from the behavior of <code>!INCLUDE</code> directives of <code>NMAKE</code>.</p>

<p>You can build ruby in any directory including the source directory, except <code>win32</code> directory in the source directory. This is restriction originating in the path search method of <code>NMAKE</code>.</p>

</main>



<footer id="validator-badges" role="contentinfo">
  <p><a href="https://validator.w3.org/check/referer">Validate</a>
  <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.1.
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>