Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > extconf.rb for Interbase on Windows

Reply
Thread Tools

extconf.rb for Interbase on Windows

 
 
eg
Guest
Posts: n/a
 
      01-14-2005
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?
 
Reply With Quote
 
 
 
 
nobu.nokada@softhome.net
Guest
Posts: n/a
 
      01-15-2005
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

^^^^^^^^^^^^^^

--
Nobu Nakada


 
Reply With Quote
 
 
 
 
Daniel Berger
Guest
Posts: n/a
 
      01-15-2005

nobu.nok...@softhome.net wrote:
> 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

 
Reply With Quote
 
eg
Guest
Posts: n/a
 
      01-15-2005
Daniel Berger wrote:

>>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
>


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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interbase Mike Hjorleifsson Python 2 07-31-2008 10:20 AM
Interbase, ASP.net, C#, and a serious headache Jay Douglas ASP .Net 3 06-08-2004 07:03 PM
Newbie: BLOB Fields into Interbase Database Ashley Lloyd Python 0 01-07-2004 10:07 AM
Plans about Interbase library Nikolay Ponomarenko Ruby 1 12-05-2003 04:09 PM
linking error (using interbase 6.0 API library) Venky C Programming 1 10-10-2003 09:27 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57