Re: [Haskell-cafe] HDBC-ODBC linking problems in windows.

2008-08-04 Thread PJ Durai
On 8/3/08, Andrew Appleyard [EMAIL PROTECTED] wrote:
 Hi PJ,

 On 2/08/2008 4:09 AM, you wrote:
  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
  [...]
  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
 

 hdbc-odbc 1.1.4.4 contains a patch to the calling convention of the ODBC
 functions (from ccall to stdcall).

 Grab version 1.1.4.4 from Hackage [1] and hopefully that'll fix your
 problem.

 [1]
 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HDBC-odbc

That works !
Thanks.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HDBC-ODBC linking problems in windows.

2008-08-03 Thread Andrew Appleyard

Hi PJ,

On 2/08/2008 4:09 AM, you wrote:

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
[...]
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


hdbc-odbc 1.1.4.4 contains a patch to the calling convention of the ODBC 
functions (from ccall to stdcall).


Grab version 1.1.4.4 from Hackage [1] and hopefully that'll fix your 
problem.


[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HDBC-odbc

Regards,
Andrew
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] HDBC-ODBC linking problems in windows.

2008-08-01 Thread PJ Durai
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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HDBC-ODBC linking problems in windows.

2008-08-01 Thread Justin Bailey
On Fri, Aug 1, 2008 at 11:09 AM, PJ Durai [EMAIL PROTECTED] wrote:
 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

I had similar issues buidling hdbc-postgres. I wrote up my experiences
on their wiki - maybe it will help you.

  http://software.complete.org/software/wiki/16/WindowsInstall

Justin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe