Hi,

I am trying to install CUBRID Database Driver through "gem install
cubrid" on my Windows x64 machine.

1. I have installed CUBRID 3.0 x64.
2. Ruby 1.8.7-p302 from http://rubyinstaller.org/downloads/
3. DevKit-3.4.5-20100819-1535-sfx.exe from
http://rubyinstaller.org/downloads/

In the gem's extconf.rb, there is a line which checks if there is a
"cascci" library like "if have_library("cascci", "cci_init")". The path
to cascci library is correctly set in "C:/CUBRID/lib", include files are
in "C:/CUBRID/include".

However, when I install cubrid gem using "gem install cubrid", or when I
compile it using "ruby extconf.rb" I got the following error:
------------------------------------------------
checking for cci_init() in -lcascci... no
cascci could not be found. Either you have not installed CUBRID Database
yet or the path to CUBRID is not set.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
------------------------------------------------
have_library: checking for cci_init() in -lcascci... --------- no

"gcc -o conftest -I. -IC:/Ruby/lib/ruby/1.8/i386-mingw32 -I.
-IC:/CUBRID/include    -g -O2 -DFD_SETSIZE=256    conftest.c  -L.
-LC:/Ruby/lib -LC:/CUBRID/lib -L.      -lmsvcrt-ruby18-static -lcascci
-lshell32 -lws2_32  "
checked program was:
/* begin */
1: #include <ws2tcpip.h>
2: #include <winsock2.h>
3: #include <windows.h>
4:
5: /*top*/
6: int main() { return 0; }
7: int t() { void ((*volatile p)()); p = (void ((*)()))cci_init; return
0; }
/* end */

"gcc -o conftest -I. -IC:/Ruby/lib/ruby/1.8/i386-mingw32 -I.
-IC:/CUBRID/include    -g -O2 -DFD_SETSIZE=256    conftest.c  -L.
-LC:/Ruby/lib -LC:/CUBRID/lib -L.      -lmsvcrt-ruby18-static -lcascci
-lshell32 -lws2_32  "
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { cci_init(); return 0; }
/* end */
--------------------

I checked the path, it is correct, CUBRID is installed. I have
successfully installed both through gem and through manual compilation
the same cubrid gem on Windows 32 bit. But on x64 it fails.

How should I compile the gem under Windows x64? Should I have some
libraries for it? Why rubygem cannot find the library in x64? I suppose
some flags should be present to indicate that this is x64 machine. Or is
there anything else I should know?

Any help would be highly appreciated. Thank you in advance!

-- 
Posted via http://www.ruby-forum.com/.