andlabs / ui

Platform-native GUI library for Go.
Other
8.33k stars 651 forks source link

Master issue for MinGW-w64 TaskDialog() linker failures #279

Open andlabs opened 6 years ago

andlabs commented 6 years ago

Apparently MinGW-w64 v4 and lower do not include TaskDialog(). Because Go currently requires gcc or compatible (e.g. clang) to build with cgo, we'll need to address this, especially since MinGW-w64 is separate from the original MinGW, and especially since some people might have installed MinGW or MinGW-w64 as part of a larger package (such as an IDE like Code::Blocks). Some people have also confused the version of MinGW-w64 with the version of gcc, which also doesn't help things.

I originally thought I fixed this in MinGW-w64 4, but apparently that only got propagated to MSYS2, not MinGW-w64 binary releases. I don't know what the current scenario is, but I will definitely need to get solid version numbers that I can test against...

I could alternatively switch to TaskDialogIndirect(), which IIRC (I could be wrong about this; I forget now) does not have this issue, but that might (does not have to, but would be nice if it was) be contingent on reworking dialogs, which I have to make an issue about, but the general gist of my dilemma can be read here. I also forget if TaskDialogIndirect() behaves differently from TaskDialog() with regards to the limit on the amount of text in the dialog and the line wrapping rules therein.

(There's also dynamically loading TaskDialog(), which is a bit overkill, but eh.)

There are a lot of people using TDM-GCC instead of MinGW-w64. I need to investigate whether that one can be used for post-Windows 2000 code at all, otherwise I have to start explicitly looking for TDM specifically to give a special error message in that case (in addition to a non-MinGW-w64 MinGW error message).

I might convert this into a tracking issue later.

lodg commented 5 years ago

我使用windows10 操作系统,msys2分支的mingw-w64 64位8.3.0版本gcc,但是我仍然无法正常使用你的ui库。当我使用go run main.go 启动我的程序时,除了这句话 "exit status 3221225785" ,什么都没发生。

andlabs commented 5 years ago

I don't speak whatever language that is (sorry), but if I were to guess it's because you're missing the manifest file.

lodg commented 5 years ago

Thank you! The problem is solved.