DB2 under Windows XP - "Missing DB2 Libraries or headers"

Discussion in 'Ruby' started by daf@jaade.com, Apr 26, 2006.

  1. Guest

    I'm trying to get the Ruby DB2 bindings to compile under Windows XP.
    I've been working on this on and off over the last few days with little
    success.

    The second step, "ruby setuyp.rb setup" was generating this error
    message:
    ABORT: Could not locate DB2 libraries or headers

    I know I have Db2 installed correctly so I did a little digging and
    found that the extconf.rb file (in ext/db2) was failing. I'm new to
    Ruby so digging through the code was an interesting exercise. I
    finally go it to show me the windows command it was trying to execute:

    cl -nologo -Feconftest
    -IC:/Ruby & Rails/ruby-db2-0.4.4/ext/db2
    -Ic:/ruby/lib/ruby/1.8/i386-mswin32
    "-I"C:/Program Files/IBM/SQLLIB"/include"
    -I. -I./.. -I./../missing
    -MD -Zi -O2b2xg- -G6 conftest.c
    msvcrt-ruby18-static.lib db2cli.lib oldnames.lib
    user32.lib advapi32.lib wsock32.lib -link
    -libpath:""C:/Program Files/IBM/SQLLIB"/lib"
    -libpath:"c:/ruby/lib"
    -stack:0x2000000

    After much playing around, I finally got a version that works:

    cl -nologo -Feconftest -I"C:/Ruby & Rails/ruby-db2-0.4.4/ext/db2"
    -I"c:/ruby/lib/ruby/1.8/i386-mswin32"
    -I"C:/Program Files/Microsoft Platform SDK/include"
    -I"C:/Program Files/IBM/SQLLIB/include" -I. -I"./.." -I"./../missing"
    -MD -Zi -O2b2x conftest.c
    msvcrt-ruby18-static.lib db2cli.lib oldnames.lib
    user32.lib advapi32.lib wsock32.lib -link
    -libpath:"C:/Program Files/Microsoft Platform SDK/lib"
    -libpath:"C:/Program Files/IBM/SQLLIB/lib"
    -libpath:"c:/ruby/lib"
    -stack:0x2000000

    The major differences are in quoting and in missing includes and
    libraries (I also removed a couple of compile options that are unknown
    or deprecated).

    So now my problem is how do I change the code to correctly generate
    this working command instead of the failing one. At this point, I'm
    really over my head since the Ruby code is a bit beyond me.

    Any help (or pointers to a working version) would be appreciated.
    , Apr 26, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hshdude
    Replies:
    12
    Views:
    1,054
    Dimitri Maziuk
    Nov 4, 2004
  2. Replies:
    0
    Views:
    7,602
  3. Philip

    DB2 driver for windows

    Philip, Sep 20, 2003, in forum: Python
    Replies:
    6
    Views:
    7,576
    Jarek Zgoda
    Sep 23, 2003
  4. Dinesh
    Replies:
    0
    Views:
    158
    Dinesh
    Apr 3, 2006
  5. Stefan Ram
    Replies:
    5
    Views:
    152
    Stefan Ram
    Mar 17, 2014
Loading...

Share This Page