I have a project depending on iconv because I need to work with the cp1251 code page. Below is a minimal implementation of a problematic project. I installed iconv from here and successfully installed the haskell "iconv" package like this
cabal install iconv --extra-include-dirs="C:\GnuWin32\include" --extra-lib-dirs="C:\GnuWin32\lib"
The iconv package icon is installed correctly, but the project, depending on this, could not be linked, that's what happens.
c:\iconvsmpl>cabal configure --extra-include-dirs="C:\GnuWin32\include" --extra- lib-dirs="C:\GnuWin32\lib" Warning: The package list for 'hackage.haskell.org' is 16 days old. Run 'cabal update' to get the latest list of available packages. Resolving dependencies... Configuring iconvsmpl-0.1.0.0... Warning: The 'license-file' field refers to the file 'LICENSE' which does not exist. c:\iconvsmpl>cabal build Building iconvsmpl-0.1.0.0... Preprocessing executable 'iconvsmpl' for iconvsmpl-0.1.0.0... [1 of 1] Compiling Main ( iconvsmpl.hs, dist\build\iconvsmpl\iconvsm pl-tmp\Main.o ) Linking dist\build\iconvsmpl\iconvsmpl.exe ... C:\Users\admin\AppData\Roaming\cabal\iconv-0.4.1.1\ghc-7.6.3/libHSiconv-0.4.1.1. a(hsiconv.o):hsiconv.c:(.text+0x7): undefined reference to `_imp__libiconv_open' C:\Users\admin\AppData\Roaming\cabal\iconv-0.4.1.1\ghc-7.6.3/libHSiconv-0.4.1.1. a(hsiconv.o):hsiconv.c:(.text+0x17): undefined reference to `_imp__libiconv' C:\Users\admin\AppData\Roaming\cabal\iconv-0.4.1.1\ghc-7.6.3/libHSiconv-0.4.1.1. a(hsiconv.o):hsiconv.c:(.text+0x27): undefined reference to `_imp__libiconv_clos e' collect2: ld returned 1 exit status c:\iconvsmpl>
Why iconv is installed and connected, but iconvsmpl cannot be connected. How to create it under Windows? Is there any other way to work with foreign encodings under Windows for Haskell?
It is highly desirable to have an executable for windows. Creating a package and working on Linux.
Haskell-Platform Version - 2013.2.0.0
source share