Daniel Berger <> writes:
> Hi all,
>
> Oracle 9.2.0.4
> Mandriva Linux 2.6.8.1
> Ruby 1.8.2
>
> I suspect I need a good dose of caffeine, because I can't figure out why
> the ruby-oci package isn't picking up the Oracle header files. To
> simplify things as much as possible, I created a test extconf.rb script
> that looks like this:
>
> # extconf.rb
> require "mkmf"
> dir_config("oracle")
> have_header("oci.h")
How about using oraconf.rb in ruby-oci8.
http://rubyforge.org/cgi-bin/viewcvs..._with_tag=MAIN
# extconf.rb
require "mkmf"
require File.dirname(__FILE__) + '/oraconf'
oraconf = OraConf.new()
$CFLAGS += oraconf.cflags
$libs += oraconf.libs
> # To demonstrate that the oci.h file does exist
> >ls /home/oracle/9204/rdbms/demo/oci.h
> /home/oracle/9204/rdbms/demo/oci.h
The simpest way is:
# extconf.rb
require "mkmf"
oracle_home = ENV['ORACLE_HOME']
$CFLAGS += " -I#{oracle_home}/rdbms/demo -I#{oracle_home}/rdbms/public "
$libs += " -L#{oracle_home}/lib -lclntsh "
have_header("oci.h")
It will work on Oracle 9i or later.
--
KUBO Takehiro
email:
web:
http://www.jiubao.org
GnuPG fingerprint = 5F7B C8EF CA16 57D0 FDE1 9F47 C001 1F93 AC08 2262