simonkrauter / NiGui

Cross-platform desktop GUI toolkit written in Nim
MIT License
718 stars 50 forks source link

Doesn't run on Windows 10 Creators Update (when compiling to 32 bit) #1

Closed ghost closed 7 years ago

ghost commented 7 years ago

Trying to run first example from NiGui with i686 MinGW (compiled .exe is 32bit):

E:\Projects\NiGui>example_01_basic_app.exe
could not import: SetWindowLongPtrW

With x32 Visual Studio compiler it's the same.

While compiling for amd64 (with x64 bit mingw or cl.exe), everything works perfectly

Probably NiGui must do checking for i386 or amd64 in winapi bindings, like this - https://github.com/jangko/nimCEF/blob/0946c0b39b1cc4976923a8af4dfc779bb9f6b70b/platform/winapi.nim#L1103

Also: https://stackoverflow.com/questions/24664245/attributeerror-function-getwindowlongptrw-not-found https://groups.google.com/forum/#!topic/golang-nuts/pkmwc8k0DpU

ghost commented 7 years ago

So, for example SetWindowLongPtrW must be SetWindowLongW on 32 bits

enthus1ast commented 7 years ago

same on windows 7 32bit

ghost commented 7 years ago

@trustable-code any thoughts?

simonkrauter commented 7 years ago

I will try to fix that sometime, even I think 32 bit is legacy.

ghost commented 7 years ago

@trustable-code I know that it's legacy, but you can output an error message (e.g. - compiling on x32 is not supported)

simonkrauter commented 7 years ago

@TiberiumN: Now it works for me under when I compile it as 32-bit Windows EXE. Please test on your system. When it does not work with Visual Studio, please make an extra issue.

ghost commented 7 years ago

@trustable-code thank you very much, it works now with visual studio compiler 32bits and mingw 32bits.