Note 1.8 as the oldest supported version

This commit is contained in:
Olly Betts 2015-01-14 11:04:02 +13:00
commit a98bda01cb

View file

@ -147,7 +147,7 @@
<H2><a name="Ruby_nn2"></a>38.1 Preliminaries</H2> <H2><a name="Ruby_nn2"></a>38.1 Preliminaries</H2>
<p> SWIG 1.3 is known to work with Ruby versions 1.6 and later. <p> SWIG 3.0 is known to work with Ruby versions 1.8 and later.
Given the choice, you should use the latest stable version of Ruby. You Given the choice, you should use the latest stable version of Ruby. You
should also determine if your system supports shared libraries and should also determine if your system supports shared libraries and
dynamic loading. SWIG will work with or without dynamic loading, but dynamic loading. SWIG will work with or without dynamic loading, but
@ -191,7 +191,7 @@ header file. This file is usually contained in a directory such as </p>
<div class="code shell diagram"> <div class="code shell diagram">
<pre>/usr/lib/ruby/1.8/x86_64-linux-gnu/ruby.h <pre>/usr/lib/ruby/1.8/x86_64-linux-gnu/ruby.h
/usr/local/lib/ruby/1.6/i686-linux/ruby.h /usr/include/ruby-2.1.0/ruby.h
</pre> </pre>
</div> </div>
@ -201,8 +201,14 @@ installed, you can run Ruby to find out. For example: </p>
<div class="code shell"> <div class="code shell">
<pre>$ ruby -e 'puts $:.join("\n")' <pre>$ ruby -e 'puts $:.join("\n")'
/usr/local/lib/ruby/site_ruby/1.6 /usr/local/lib/ruby/site_ruby/1.6/i686-linux /usr/local/lib/site_ruby/2.1.0
/usr/local/lib/ruby/site_ruby /usr/local/lib/ruby/1.6 /usr/local/lib/ruby/1.6/i686-linux . /usr/local/lib/x86_64-linux-gnu/site_ruby
/usr/local/lib/site_ruby
/usr/lib/ruby/vendor_ruby/2.1.0
/usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.1.0
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/2.1.0
/usr/lib/x86_64-linux-gnu/ruby/2.1.0
</pre> </pre>
</div> </div>
@ -260,7 +266,7 @@ operating system would look something like this: </p>
<div class="code shell"> <div class="code shell">
<pre>$ swig -ruby example.i <pre>$ swig -ruby example.i
$ gcc -O2 -fPIC -c example.c $ gcc -O2 -fPIC -c example.c
$ gcc -O2 -fPIC -c example_wrap.c -I/usr/local/lib/ruby/1.6/i686-linux $ gcc -O2 -fPIC -c example_wrap.c -I/usr/include/ruby-2.1.0
$ gcc -shared example.o example_wrap.o -o example.so $ gcc -shared example.o example_wrap.o -o example.so
</pre> </pre>
</div> </div>
@ -334,7 +340,7 @@ using the C++ compiler. For example: </p>
<pre> <pre>
$ swig -c++ -ruby example.i $ swig -c++ -ruby example.i
$ g++ -fPIC -c example.cxx $ g++ -fPIC -c example.cxx
$ g++ -fPIC -c example_wrap.cxx -I/usr/local/lib/ruby/1.6/i686-linux $ g++ -fPIC -c example_wrap.cxx -I/usr/include/ruby-2.1.0
$ g++ -shared example.o example_wrap.o -o example.so $ g++ -shared example.o example_wrap.o -o example.so
</pre> </pre>
</div> </div>
@ -4466,7 +4472,7 @@ and then type <tt>make</tt> to build the shared library: </p>
<pre>$ <b>ruby extconf.rb</b> <pre>$ <b>ruby extconf.rb</b>
creating Makefile creating Makefile
$ <b>make</b> $ <b>make</b>
g++ -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.7/i686-linux \ g++ -fPIC -g -O2 -I. -I/usr/include/ruby-2.1.0 \
-I. -c shape_wrap.cxx -I. -c shape_wrap.cxx
gcc -shared -L/usr/local/lib -o shape.so shape_wrap.o -L. \ gcc -shared -L/usr/local/lib -o shape.so shape_wrap.o -L. \
-lruby -lruby -lc</pre> -lruby -lruby -lc</pre>