I want to deploy an application on Windows that needs to access the GHC API. Using the first simple example from the Wiki:
http://www.haskell.org/haskellwiki/GHC/As_a_library
results in the following error (compiled on one machine with haskell platform and executed on another clean windows install): test.exe: can't find a package database at C:\haskell\lib\package.conf.d
I'd like to deploy my application as a simple zip file and not require the user to have anything installed. Is there a straightforward way to include the needed GHC things in that zip file so it will work?
package.conf.d
instead of callinglibdir
. i.e.runGhc (Just "path\to\ghc\lib")
– Implacentallib
andmingw
to your zip and providerunGhc
with relative path to thislib
(and don't forget to remove unused packages and libraries with profiling information fromlib
). – Implacental