[Haskell-beginners] Include external libs on cabal project

Marco De Oliveira deolivem at gmail.com
Mon Dec 20 23:59:54 CET 2010


Hi,

I try to include an external lib (and C files that I made) on my cabal 
file and when I launch "configure" I have errors.

I have added on my file:

extra-libraries: "winscard"
include-dirs: "C:\Program Files\Microsoft SDKs\Windows\v7.1\Include"
extra-lib-dirs: "C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib"

and it fails because of the space on the path. (see logs)

Is the syntax correct?
What I have to change so that cabal can understand the space on 
directory path?


Thanks for help


Cabal version: 1.8.0.6

log after "runhaskell setup.lhs configure -v3"

("C:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\mingw\\bin\\gcc.exe",["C:\\Us
ers\\E6400\\AppData\\Local\\Temp\\8104.c","-o","C:\\Users\\E6400\\AppData\\Local
\\Temp\\8104","-D__GLASGOW_HASKELL__=612","-Idist\\build\\autogen","-ISmartCard/
libpcsc/inc",*"-I\"C:\\Program","-IFiles\\Microsoft","-ISDKs\\Windows\\v7.1\\Incl
ude\"*","-I.","-IC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib\\base-4.2.0
.2\\include","-IC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib/include","-
IC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib/include","-lwinscard",*"-L\
"C:\\Program","-LFiles\\Microsoft","-LSDKs\\Windows\\v7.1\\Lib\"*","-LC:\\Program
  Files\\Haskell Platform\\2010.2.0.0\\lib\\base-4.2.0.2","-LC:\\Program 
Files\\H
askell Platform\\2010.2.0.0\\lib\\integer-gmp-0.2.0.1","-LC:\\Program 
Files\\Has
kell Platform\\2010.2.0.0\\lib\\ghc-prim-0.2.0.0","-LC:\\Program 
Files\\Haskell
Platform\\2010.2.0.0\\lib","-LC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\l
ib/gcc-lib","-LC:\\Program Files\\Haskell Platform\\2010.2.0.0\\lib"])
C:\Program Files\Haskell Platform\2010.2.0.0\mingw\bin\gcc.exe returned
ExitFailure 1 with error message:
C:\Program Files\Haskell Platform\2010.2.0.0\mingw\bin\ld.exe: cannot find
-lwinscard
collect2: ld returned 1 exit status
("C:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\mingw\\bin\\gcc.exe",["C:\\Us
ers\\E6400\\AppData\\Local\\Temp\\8104.c","-o","C:\\Users\\E6400\\AppData\\Local
\\Temp\\8104","-lwinscard","*-L\"C:\\Program","-LFiles\\Microsoft","-LSDKs\\Windo
ws\\v7.1\\Lib\"",*"-LC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib\\base-4
.2.0.2","-LC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib\\integer-gmp-0.2
.0.1","-LC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib\\ghc-prim-0.2.0.0"
,"-LC:\\Program Files\\Haskell Platform\\2010.2.0.0\\lib","-LC:\\Program 
Files\\
Haskell Platform\\2010.2.0.0\\lib/gcc-lib","-LC:\\Program Files\\Haskell 
Platfor
m\\2010.2.0.0\\lib"])
C:\Program Files\Haskell Platform\2010.2.0.0\mingw\bin\gcc.exe returned
ExitFailure 1 with error message:
C:\Program Files\Haskell Platform\2010.2.0.0\mingw\bin\ld.exe: cannot find
-lwinscard
collect2: ld returned 1 exit status
("C:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\mingw\\bin\\gcc.exe",["C:\\Us
ers\\E6400\\AppData\\Local\\Temp\\8104.c","-o","C:\\Users\\E6400\\AppData\\Local
\\Temp\\8104","-lwinscard","-L\"C:\\Program","-LFiles\\Microsoft","-LSDKs\\Windo
ws\\v7.1\\Lib\"","-LC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib\\base-4
.2.0.2","-LC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib\\integer-gmp-0.2
.0.1","-LC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib\\ghc-prim-0.2.0.0"
,"-LC:\\Program Files\\Haskell Platform\\2010.2.0.0\\lib","-LC:\\Program 
Files\\
Haskell Platform\\2010.2.0.0\\lib/gcc-lib","-LC:\\Program Files\\Haskell 
Platfor
m\\2010.2.0.0\\lib"])
C:\Program Files\Haskell Platform\2010.2.0.0\mingw\bin\gcc.exe returned
ExitFailure 1 with error message:
C:\Program Files\Haskell Platform\2010.2.0.0\mingw\bin\ld.exe: cannot find
-lwinscard
collect2: ld returned 1 exit status
("C:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\mingw\\bin\\gcc.exe",["C:\\Us
ers\\E6400\\AppData\\Local\\Temp\\8104.c","-o","C:\\Users\\E6400\\AppData\\Local
\\Temp\\8104","-c","-D__GLASGOW_HASKELL__=612","-Idist\\build\\autogen","-ISmart
Card/libpcsc/inc",*"-I\"C:\\Program","-IFiles\\Microsoft","-ISDKs\\Windows\\v7.1\
\Include\*"","-I.","-IC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib\\base-
4.2.0.2\\include","-IC:\\Program Files\\Haskell 
Platform\\2010.2.0.0\\lib/includ
e","-IC:\\Program Files\\Haskell Platform\\2010.2.0.0\\lib/include"])
Setup.lhs: Missing dependency on a foreign library:
* Missing C library: winscard
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.



























































-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20101220/b50ab8e4/attachment.htm>


More information about the Beginners mailing list