[Rubyinstaller-devel] Buildinf OCI and Ruby-ODBC problems?

Luis Lavena luislavena at gmail.com
Mon Oct 8 23:52:59 EDT 2007


Curt,

I'm in the middle of the rebuild process (with p111) and found the
issue you're getting with ruby-odbc (0.9995).

The following error, is part of the mkmf.log file:

have_library_ex: checking for SQLAllocConnect() in -lodbc32...
-------------------- no

"cl -nologo -Feconftest -I.
-ID:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib/ruby/1.8/i386-mswin32
-ID:/Users/Developer/code/OpenSource/installer-trunk/downloads/ruby-odbc-0.9995
-ID:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib/ruby/1.8/i386-mswin32
 -MD -Zi -O2b2xg- -G6 conftest.c   msvcrt-ruby18-static.lib odbc32.lib
 oldnames.lib user32.lib advapi32.lib ws2_32.lib   -link
-libpath:"." -libpath:"D:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib"
-stack:0x2000000"
conftest.c
conftest.obj : error LNK2001: unresolved external symbol _SQLAllocConnect
conftest.exe : fatal error LNK1120: 1 unresolved externals
checked program was:
/* begin */
1: #define WIN32_LEAN_AND_MEAN
2: #include <winsock2.h>
3: #include <windows.h>
4: #include <sql.h>
5:
6: /*top*/
7: int main() { return 0; }
8: int t() { void ((*volatile p)()); p = (void
((*)()))SQLAllocConnect; return 0; }
/* end */

"cl -nologo -Feconftest -I.
-ID:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib/ruby/1.8/i386-mswin32
-ID:/Users/Developer/code/OpenSource/installer-trunk/downloads/ruby-odbc-0.9995
-ID:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib/ruby/1.8/i386-mswin32
 -MD -Zi -O2b2xg- -G6 conftest.c   msvcrt-ruby18-static.lib odbc32.lib
 oldnames.lib user32.lib advapi32.lib ws2_32.lib   -link
-libpath:"." -libpath:"D:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib"
-stack:0x2000000"
conftest.c
C:\VC\PSDK-preR2\Include\sqltypes.h(275) : error C2061: syntax error :
identifier 'DWORD'
C:\VC\PSDK-preR2\Include\sqltypes.h(276) : error C2061: syntax error :
identifier 'Data2'
C:\VC\PSDK-preR2\Include\sqltypes.h(276) : error C2059: syntax error : ';'
C:\VC\PSDK-preR2\Include\sqltypes.h(277) : error C2061: syntax error :
identifier 'Data3'
C:\VC\PSDK-preR2\Include\sqltypes.h(277) : error C2059: syntax error : ';'
C:\VC\PSDK-preR2\Include\sqltypes.h(278) : error C2061: syntax error :
identifier 'Data4'
C:\VC\PSDK-preR2\Include\sqltypes.h(278) : error C2059: syntax error : ';'
C:\VC\PSDK-preR2\Include\sqltypes.h(278) : error C2059: syntax error : '['
C:\VC\PSDK-preR2\Include\sqltypes.h(279) : error C2059: syntax error : '}'
conftest.c(5) : error C2198: 'SQLAllocConnect' : too few actual parameters
checked program was:
/* begin */
1: #include <sql.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { SQLAllocConnect(); return 0; }
/* end */

--------------------


It seems that the test program is including sql.h with its
pre-requisite: windows.h

Adding it, I'm getting another error:

have_library_ex: checking for SQLAllocConnect() in -lodbc32...
-------------------- no

"cl -nologo -Feconftest -I.
-ID:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib/ruby/1.8/i386-mswin32
-ID:/Users/Developer/code/OpenSource/installer-trunk/downloads/ruby-odbc-0.9995
-ID:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib/ruby/1.8/i386-mswin32
 -MD -Zi -O2b2xg- -G6 conftest.c   msvcrt-ruby18-static.lib odbc32.lib
 oldnames.lib user32.lib advapi32.lib ws2_32.lib   -link
-libpath:"." -libpath:"D:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib"
-stack:0x2000000"
conftest.c
conftest.obj : error LNK2001: unresolved external symbol _SQLAllocConnect
conftest.exe : fatal error LNK1120: 1 unresolved externals
checked program was:
/* begin */
1: #define WIN32_LEAN_AND_MEAN
2: #include <winsock2.h>
3: #include <windows.h>
4: #include <windows.h>
5: #include <sql.h>
6:
7: /*top*/
8: int main() { return 0; }
9: int t() { void ((*volatile p)()); p = (void
((*)()))SQLAllocConnect; return 0; }
/* end */

"cl -nologo -Feconftest -I.
-ID:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib/ruby/1.8/i386-mswin32
-ID:/Users/Developer/code/OpenSource/installer-trunk/downloads/ruby-odbc-0.9995
-ID:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib/ruby/1.8/i386-mswin32
 -MD -Zi -O2b2xg- -G6 conftest.c   msvcrt-ruby18-static.lib odbc32.lib
 oldnames.lib user32.lib advapi32.lib ws2_32.lib   -link
-libpath:"." -libpath:"D:/Users/Developer/code/OpenSource/installer-trunk/ruby/lib"
-stack:0x2000000"
conftest.c
conftest.c(6) : error C2198: 'SQLAllocConnect' : too few actual parameters
checked program was:
/* begin */
1: #include <windows.h>
2: #include <sql.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { SQLAllocConnect(); return 0; }
/* end */


I need to check "too few actual parameters" (the SQLAllocConnect
signature) and see what I could do to fix it.

But so far, it seems ruby-odbc is too old for latest SDKs... or we are
doing something wrong.

What was the error you got?

-- 
Luis Lavena
Multimedia systems
-
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi


More information about the Rubyinstaller-devel mailing list