[Haskell-cafe] PortAudio library successfully built on Windows

M Xyz functionallyharmonious at yahoo.com
Sat Dec 5 22:47:04 EST 2009


John Lask, 
The steps you enumerated below successfully built portaudio for me! Thank you!

I wonder though, you said to rename the dll to libpa19.dll from portaudio_x86.dll
and to change the .cabal entry from "extra-Libraries: portaudio" to "extra-Libraries: pa19".
Since my .dll name and .cabal file entry were mismatched, was that what could have been wrong all along? Was the creation of a .a file necessary?
I would delete the .a file and retry with libportaudio.dll but I won't push my luck.

Now if I could just get Gtk2hs working now, I could be happy *and* productive. :)

--- On Sat, 12/5/09, john lask <jvlask at hotmail.com> wrote:

From: john lask <jvlask at hotmail.com>
Subject: RE: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
To: daniel.is.fischer at web.de, functionallyharmonious at yahoo.com
Cc: haskell-cafe at haskell.org
Date: Saturday, December 5, 2009, 9:03 PM






I don't know whether this will help you but I just downloaded an built
the haskell portaudio package ... (I had a windows msvc build of
portaudio dll already) the process I used ... ghc 6.10.4, portaudio-19

make an import lib for ghc from dll:
pexports libpa19.dll > libpa19.def
dlltool --input-def libpa19.def --output-lib libpa19.a

edit the .cabal file or use command line flags

  extra-Libraries: pa19
  extra-lib-dirs: c:\portaudio19\lib
  include-dirs:   c:\portaudio19\include

 runghc setup configure

make sure you have cpp i.e. the c-preprocessor on your exe path,
otherwise you will get
'cpp' is not recognized as an internal or external command,
operable program or batch file.
c2hs.exe: Error during preprocessing custom header file

runghc setup build

builds ok ...??


> From: daniel.is.fischer at web.de
> To: functionallyharmonious at yahoo.com
> Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?
> Date: Sun, 6 Dec 2009 02:34:17 +0100
> CC: haskell-cafe at haskell.org
> 
> Am Sonntag 06 Dezember 2009 01:49:49 schrieb M Xyz:
> 
> I just had another idea.
> 
> dafis at linux-mkk1:~> c2hs -o memyself.hs memyself.chs
> c2hs: does not exist
> 
> it's not that c2hs isn't found or something, c2hs doesn't find Base.chs!
> 
> Try installing from the unpacked sources (cd portaudio; cabal install) or the old-
> fashioned way:
> 
> cd portaudio-0.0.1
> 
> ghc --make Setup
> 
> ./Setup configure --help
> (choose your options, prefix, profiling, ...)
> 
> ./Setup configure $OPTIONS
> ./Setup build
> 
> if all's well,
> 
> ./Setup haddock
> ./Setup install
> 
> (dies for me with
> dist/build/Sound/PortAudio/Base.chs.h:1:23: error: portaudio.h: Datei oder 
> Verzeichnisnicht gefunden
> c2hs: Error during preprocessing custom header file
> cabal: Error: some packages failed to install:
> portaudio-0.0.1 failed during the building phase. The exception was:
> exit: ExitFailure 1
> because I don't have portaudio installed)
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
 		 	   		  
Australia's #1 job site If It Exists, You'll Find it on SEEK 



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091205/9d386771/attachment.html


More information about the Haskell-Cafe mailing list