Note 1.8 as the oldest supported version
This commit is contained in:
parent
ea5be4e508
commit
a98bda01cb
1 changed files with 13 additions and 7 deletions
|
|
@ -147,7 +147,7 @@
|
|||
<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
|
||||
should also determine if your system supports shared libraries and
|
||||
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">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
@ -201,8 +201,14 @@ installed, you can run Ruby to find out. For example: </p>
|
|||
|
||||
<div class="code shell">
|
||||
<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/ruby/site_ruby /usr/local/lib/ruby/1.6 /usr/local/lib/ruby/1.6/i686-linux .
|
||||
/usr/local/lib/site_ruby/2.1.0
|
||||
/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>
|
||||
</div>
|
||||
|
||||
|
|
@ -260,7 +266,7 @@ operating system would look something like this: </p>
|
|||
<div class="code shell">
|
||||
<pre>$ swig -ruby example.i
|
||||
$ 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
|
||||
</pre>
|
||||
</div>
|
||||
|
|
@ -334,7 +340,7 @@ using the C++ compiler. For example: </p>
|
|||
<pre>
|
||||
$ swig -c++ -ruby example.i
|
||||
$ 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
|
||||
</pre>
|
||||
</div>
|
||||
|
|
@ -4466,7 +4472,7 @@ and then type <tt>make</tt> to build the shared library: </p>
|
|||
<pre>$ <b>ruby extconf.rb</b>
|
||||
creating Makefile
|
||||
$ <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
|
||||
gcc -shared -L/usr/local/lib -o shape.so shape_wrap.o -L. \
|
||||
-lruby -lruby -lc</pre>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue