Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distributing wxHaskell based application in Windows

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?

like image 413
davetapley Avatar asked Jul 20 '26 17:07

davetapley


1 Answers

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 -static option isn't really necessary: it's ghc's default. The -optl options get passed to gcc. -optl-static statically links in any C libraries you're using (and I imagine wxHaskell uses some). And -optl-pthread is black magic to me, but it seems like a good idea.

like image 194
Zopa Avatar answered Jul 22 '26 06:07

Zopa