Open Wikiemol opened 4 years ago
I was planning to do a pull request for this. But it looks like it would not be a simple change seeing as web view's interface has changed entirely.
Moreover, it seems like building the webview header with GHC is broken on mac, since compiling c with c++ features doesn't seem to be supported very well in GHC. You can force clang to do it alone (although it will give you a warning that this is deprecated), but I can't figure out how to add the right flags to ghc/cabal to make it work.
It seems like the only way to get this to work on Catalina is to create a dynamic library and link that with your project. Unfortunately, it looks difficult, if not currently impossible, to make a standalone stack library on Catalina this way, because dynamic libraries aren't really supported by stack and also because Catalina gets rid of any place where you could install a dynamic library on the user's computer.
If anyone ends up here trying to find a solution, I have provided a proof of concept of how to get it to work on Catalina here, however this is obviously not ideal.
It doesn't seem like webviewhs is really supported anymore anyways, but, unless someone with more knowledge about how stack/cabal works can help, it looks like webviewhs support for Catalina is completely a thing of the past.
@Wikiemol I was able to build webviewhs on Catalina, it was enough to add
-DOBJC_OLD_DISPATCH_PROTOTYPES=1
to ccflags in the cabal file.
I'm also currently facing this issue. Your suggestion @jacekszymanski didn't seem to work for me unfortunately...
@santiweight could you post your exact error message? Also, are you building with stack or cabal, light or heavy version?
I think all that is needed is to update webview to the newest version to get the fix for this issue. The error I am seeing is identical to the one mentioned here:
https://github.com/zserge/webview/issues/297