[Haskell-beginners] Linking C library with haskell in Windows

kotshie kotshie at gmail.com
Sat May 26 20:48:15 CEST 2012


Hi all,

I created Haskell Bindings to the NetCDF Library on linux and everything 
works well, bute when trying to ported to windows, I keep receiving 
undefined references when linking.

I changed the stdcall on the FFI's, played with the cabal file to link 
to different libraries, both built on VC and MinGW but still can't find 
the solution

Linking Test.exe ...
.\NetCDFRaw.o:fake:(.text+0x2eb): undefined reference to `nc_create at 12'
.\NetCDFRaw.o:fake:(.text+0x45f): undefined reference to `nc_open at 12'
.\NetCDFRaw.o:fake:(.text+0x5e5): undefined reference to `nc_def_dim at 16'
.\NetCDFRaw.o:fake:(.text+0x787): undefined reference to `nc_inq_dimid at 12'
.\NetCDFRaw.o:fake:(.text+0x92e): undefined reference to `nc_def_var at 24'
.\NetCDFRaw.o:fake:(.text+0xb35): undefined reference to 
`nc_put_att_text at 16'
.\NetCDFRaw.o:fake:(.text+0xd0a): undefined reference to `nc_put_att_int at 24'
.\NetCDFRaw.o:fake:(.text+0xf32): undefined reference to 
`nc_put_att_double at 24'
.\NetCDFRaw.o:fake:(.text+0x1148): undefined reference to `nc_inq at 20'
.\NetCDFRaw.o:fake:(.text+0x130e): undefined reference to `nc_inq_ndims at 8'


Is there something I am missing?


kotshie




More information about the Beginners mailing list