[Haskell-cafe] HDBC-ODBC linking problems in windows.
PJ Durai
pjdtech2000 at gmail.com
Fri Aug 1 14:09:30 EDT 2008
Greetings everyone,
I am having issues getting hdbc/odbc working on windows.
When using GHC, I am not able to compile a simple program. It ends up
with linker errors like
C:\Program Files\Haskell\HDBC-odbc-1.1.4.3\ghc-6.8.3/libHSHDBC-odbc-1.1.4.3.a(Connection.o)(.text+0x52c):fake:
undefined reference to `SQLAllocHandle'
C:\Program Files\Haskell\HDBC-odbc-1.1.4.3\ghc-6.8.3/libHSHDBC-odbc-1.1.4.3.a(Connection.o)(.text+0x5b8):fake:
undefined reference to `SQLSetEnvAttr'
C:\Program Files\Haskell\HDBC-odbc-1.1.4.3\ghc-6.8.3/libHSHDBC-odbc-1.1.4.3.a(Connection.o)(.text+0x62c):fake:
undefined reference to `SQLDriverConnect'
C:\Program Files\Haskell\HDBC-odbc-1.1.4.3\ghc-6.8.3/libHSHDBC-odbc-1.1.4.3.a(Connection.o)(.text+0x700):fake:
undefined reference to `SQLEndTran'
C:\Program Files\Haskell\HDBC-odbc-1.1.4.3\ghc-6.8.3/libHSHDBC-odbc-1.1.4.3.a(Connection.o)(.text+0x770):fake:
undefined reference to `SQLGetInfo'
C:\Program Files\Haskell\HDBC-odbc-1
When I use ghci, it exits silently.
It looks like calling convension mix-up in FFI declarations to me.
I ran 'dumpbin' on odbc32.lib and all the exported function names are
decorated like they are PASCAL calls, not ccall's. But GHC in this
case is looking for undecorated names.
I assume it works as is on Unix (unixODBC) ?
Is there an easy workaround for this? Or am I doing something wrong?
MySetup
=======
Windows XP SP2
ghc 6.8.3
hdbc 1.1.5.0
hdbc-odbc 1.1.4.3.0
appreciate your time.
Thanks
pj
More information about the Haskell-Cafe
mailing list