extconf.rb for Interbase on Windows

E

eg

I am trying to get a Ruby extension working under Windows XP and have
some questions. Specifically, I downloaded the interbase 0.07 release
from RAA.

This package includes: extconf.rb, interbase.c and readmes.

I have ruby 1.8.2 release installed and VS .Net 2003 on my machine.

When I run "ruby extconf.rb"

it prints out:

checking for main() in gdslib.lib... no
checking for main() in gds.lib... no
checking for main() in fbclient_ms.lib... no

I have tried adding various combinations of
--with-interbase-dir=c:\dev\firebirdql to the command line but to no avail.

The contents of extconf.rb are:
***** Start of extconf.rb *****
#!/usr/bin/env ruby
# ruby extconf.rb --with-opt-dir=e:/Firebird
require 'mkmf'

libs = %w/ gdslib gds / # InterBase library

fbclientlib = # Firebird library
case RUBY_PLATFORM
when /bccwin32/
"fbclient_bor"
when /mswin32/
"fbclient_ms"
else
"fbclient"
end
libs.push fbclientlib

test_func = "isc_attach_database"

# for ruby-1.8.1 mkmf
case RUBY_PLATFORM
when /win/
libs.find {|lib| have_library(lib) } and
have_func(test_func, ["ibase.h"])
else
libs.find {|lib| have_library(lib, test_func) }
end and

create_makefile("interbase")
***** end of extconf.rb *****


The mkmf.log file output (for the fbclient_ms section) looks like:


***** start of mkmf.log *****
--------------------

have_library: checking for main() in fbclient_ms.lib...
-------------------- no

"cl -nologo -Feconftest -IC:/dev/ruby-interbase-0.07
-Ic:/ruby/lib/ruby/1.8/i386-mswin32 -IC:\dev\FirebirdSQL/include -I.
-I./.. -I./../missing -MD -Zi -O2b2xg- -G6 conftest.c
msvcrt-ruby18-static.lib fbclient_ms.lib oldnames.lib user32.lib
advapi32.lib wsock32.lib -link -libpath:"C:\dev\FirebirdSQL/lib"
-libpath:"c:/ruby/lib" -stack:0x2000000"
checked program was:
/* begin */

/*top*/
int main() { return 0; }
int t() { main(); return 0; }
/* end */

"cl -nologo -Feconftest -IC:/dev/ruby-interbase-0.07
-Ic:/ruby/lib/ruby/1.8/i386-mswin32 -IC:\dev\FirebirdSQL/include -I.
-I./.. -I./../missing -MD -Zi -O2b2xg- -G6 conftest.c
msvcrt-ruby18-static.lib fbclient_ms.lib oldnames.lib user32.lib
advapi32.lib wsock32.lib -link -libpath:"C:\dev\FirebirdSQL/lib"
-libpath:"c:/ruby/lib" -stack:0x2000000"
checked program was:
/* begin */
#include <winsock2.h>
#include <windows.h>

/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */

--------------------
***** end of mkmk.log *****



I have VS Net 2003 on my machine.

It seems I am missing a step to get it to find the interbase library and
header Does anyone have any suggestions?
 
N

nobu.nokada

Hi,

At Sat, 15 Jan 2005 04:26:12 +0900,
eg wrote in [ruby-talk:126484]:
I have tried adding various combinations of
--with-interbase-dir=c:\dev\firebirdql to the command line but to no avail.

That extocnf.rb doesn't seem to provide that option.
The contents of extconf.rb are:
# ruby extconf.rb --with-opt-dir=e:/Firebird
^^^^^^^^^^^^^^
 
D

Daniel Berger

Hi,

At Sat, 15 Jan 2005 04:26:12 +0900,
eg wrote in [ruby-talk:126484]:
I have tried adding various combinations of
--with-interbase-dir=c:\dev\firebirdql to the command line but to
no avail.

That extocnf.rb doesn't seem to provide that option.

But it should. Ask the author to add dir_config("interbase") to the
extconf.rb file. You can add it yourself in the meantime.
Regards,

Dan
 
E

eg

Daniel said:
But it should. Ask the author to add dir_config("interbase") to the
extconf.rb file. You can add it yourself in the meantime.
Regards,

Dan

Thanks. That does it. I also forgot to set my vcvars32.bat (VC Net
environment variables) before calling this. At least now it creates the
makefile.

E.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top