[Haskell-cafe] linking Haskell app with Curl on Windows

Eugene Dzhurinsky jdevelop at gmail.com
Thu Aug 16 14:11:08 CEST 2012


Hi!

I'm facing strange issue with linking my application against Curl (using Haskell
Curl binding curl-1.3.7): the application compiles well, but fails on linking
stage:

=====================================================================================

C:\haskell\bin\ghc.exe --make -o dist\build\imgpaste\imgpaste.exe -hide-all-packages -fbuilding-cabal-package -package-conf dist\package.conf.inplace -i -idist\build\imgpaste\imgpaste-tmp -i. -idist\build\autogen -Idist\build\autogen -Idist\build\imgpaste\imgpaste-tmp -optP-include -optPdist\build\autogen\cabal_macros.h -odir dist\build\imgpaste\imgpaste-tmp -hidir dist\build\imgpaste\imgpaste-tmp -stubdir dist\build\imgpaste\imgpaste-tmp -package-id base-4.5.0.0-597748f6f53a7442bcae283373264bb6 -package-id bytestring-0.9.2.1-df82064cddbf74693df4e042927e015e -package-id curl-1.3.7-ed08f87bd8c487f1e11a8c3b67bf4e51 -package-id directory-1.1.0.2-0270278088d4b2588b52cbec49af4cb7 -package-id hxt-9.2.2-e687550fbbb6ff367ee9c95584c3f0a0 -package-id hxt-xpath-9.1.2-4a15d34a0b66fa21832bb4bb0f68477f -package-id regex-pcre-0.94.4-f2f06ed579a684904354d97b04a74d9e -O -XHaskell98 .\Main.hs -llibcrypto -lssh2 -lssl -lz -lidn -LC:\curl\lib
Linking dist\build\imgpaste\imgpaste.exe ...
C:\Program Files\Haskell\curl-1.3.7\ghc-7.4.1/libHScurl-1.3.7.a(curlc.o):curlc.c:(.text+0xd2): undefined reference to `_imp__curl_easy_getinfo'
C:\Program Files\Haskell\curl-1.3.7\ghc-7.4.1/libHScurl-1.3.7.a(curlc.o):curlc.c:(.text+0xee): undefined reference to `_imp__curl_easy_getinfo'
C:\Program Files\Haskell\curl-1.3.7\ghc-7.4.1/libHScurl-1.3.7.a(curlc.o):curlc.c:(.text+0x10a): undefined reference to `_imp__curl_easy_getinfo'

[ lots of error messages skipped ]

C:\curl\lib/libcurl.a(md5.o):(.text+0x3b): undefined reference to `MD5_Update'
C:\curl\lib/libcurl.a(md5.o):(.text+0x4e): undefined reference to `MD5_Final'
C:\curl\lib/libcurl.a(md5.o):(.rdata+0x0): undefined reference to `MD5_Init'
C:\curl\lib/libcurl.a(md5.o):(.rdata+0x4): undefined reference to `MD5_Update'
C:\curl\lib/libcurl.a(md5.o):(.rdata+0x8): undefined reference to `MD5_Final'
C:\curl\lib/libcurl.a(md5.o):(.rdata+0x14): undefined reference to `MD5_Init'
C:\curl\lib/libcurl.a(md5.o):(.rdata+0x18): undefined reference to `MD5_Update'
C:\curl\lib/libcurl.a(md5.o):(.rdata+0x1c): undefined reference to `MD5_Final'
cabal.EXE: Error: some packages failed to install:
imgpaste-0.2 failed during the building phase. The exception was:
ExitFailure 1

=====================================================================================

What may be wrong here? Curl itself was installed without errors. Looking for
symbols 'MD5_Final' in directory C:\curl\lib results in 'libcrypto.a',
'libcrypto.dll.a' and 'libcurl.a'

-- 
Eugene N Dzhurinsky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120816/84ffe5b5/attachment.pgp>


More information about the Haskell-Cafe mailing list