2009-10-14 80 views
3

haskell'openid'包依賴於需要openssl的HsOpenSSL和nano-hmac包。我編譯OpenSSL,以便MinGW的在C:\ OpenSSL的\目錄下進行安裝OpenID的包下面的命令:如何在windows中安裝haskell openid包

cabal install openid --extra-include-dirs=C:\OpenSSL\outinc --extra-lib-dirs=C:\OpenSSL\out 

當我試圖用這個包我收到很多鏈接錯誤編譯哈斯克爾程序。

test.hs:

import Network.OpenID 

main = print "ok" 

ghc --make test.hs

Linking test.exe ... 
C:\OpenSSL\out/libcrypto.a(m_sha1.o):m_sha1.c:(.text+0x60): multiple definition of `EVP_sha1' 
C:\OpenSSL\out/libeay32.a(deegs01228.o):(.text+0x0): first defined here 
C:\OpenSSL\out/libcrypto.a(m_sha1.o):m_sha1.c:(.text+0x100): multiple definition of `EVP_sha256' 
C:\OpenSSL\out/libeay32.a(deegs.o):(.text+0x0): first defined here 
..... 
C:\OpenSSL\out/libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x2d4): undefined reference to `X509_VERIFY_PARAM_set_purpose' 
C:\OpenSSL\out/libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x2f1): undefined reference to `X509_VERIFY_PARAM_set_purpose' 
C:\OpenSSL\out/libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x314): undefined reference to `X509_VERIFY_PARAM_set_trust' 
..... 
collect2: ld returned 1 exit status 

我做錯了什麼?

回答