For a wxHaskell based application distributed on Windows, can I distribute the necessary WX DLLs right alongside the application, without having to do a separate install of WX?
I want to be able to distribute the application as a zip file and not require the user to have anything installed. Is that possible?
I’m by no means a wxHaskell or a wxWidgets expert, but…
For your use case, it sounds like you want statically linked libraries, not DLLs. WxWidgets seems to be fine with that. So if you use
ghc -static -optl-static -optl-pthread, you should get the result you want.Some annotation: the
-staticoption isn’t really necessary: it’s ghc’s default. The-optloptions get passed to gcc.-optl-staticstatically links in any C libraries you’re using (and I imagine wxHaskell uses some). And-optl-pthreadis black magic to me, but it seems like a good idea.