开发者

Distributing wxHaskell based application in Windows

开发者 https://www.devze.com 2023-03-22 13:08 出处:网络
For a wxHaskell based application distributed on Windows, can I distribute the necessary WX DLLs right along开发者_运维技巧side the application, without having to do a separate install of WX?

For a wxHaskell based application distributed on Windows, can I distribute the necessary WX DLLs right along开发者_运维技巧side 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 -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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号