32-bit windows: https://github.com/jlp765/ui/raw/ad4444e5dc861c31e1b5c8b593381b89bc3a2971/libs/libui32.dll
64-bit windows: https://github.com/jlp765/ui/raw/ad4444e5dc861c31e1b5c8b593381b89bc3a2971/libs/libui64.dll
I agree that it would be great if someone running Windows could provide the proper compiled lib.dll files. The ones linked above give an error for me (complaining about a missing MSVCP140.dll).
The last compiled libui.dll that still works for me is from an older release by the original author of the library: https://github.com/andlabs/libui/releases/download/alpha3/alpha3.tar.gz
But that version is not compatible with Arag's higher level wrapper anymore, which I would really like to use.
Because I am not developing on Windows, but I develop on Linux for Linux and for my Windows-running colleagues. For this reason, I have no Admin rights on my Windows VM and the Windows computers of my colleagues.
The libui.dll I can just copy alongside with the Nim application to Windows, works great! Installing MSVCP140.dll and whatever else - not so easy.
I mean, it might be that libui.dll can not be compiled without the MSVCP140.dll dependency anymore, then I would be stuck.
But I have a version of libui.dll (linked above), which does not have this dependency and runs fine, and I just think it should be possible to generate the lib.dll from the latest source version also without the MSVCP140.dll dependency.
I just can not do it, because I have not Windows compile toolchain available. I tried to cross-compile the libui source to Windows with GCC, but this is documented to not work (and it didn't).
Well there are a lot of programs which just bundle MSVCP140.dll with their executable, like you do with libui.dll. So why not just place MSVCP140.dll next to it?
It's also possible to directly install redistributable Visual C++ DLLs in the application local folder, which is the folder that contains your executable application file.
(From here)
But I have a version of libui.dll (linked above), which does not have this dependency and runs fine
I highly doubt it. The MSVCP140.dll is the C/C++ standard library on Windows, and almost every C/C++ program depends on it. Typically, Windows has some version(s) of this dll already preinstalled, in which case you do not need to redistribute it – it just works. However, when other versions are required than those that are present, you need to either bundle them or require the user to install them.
You may doubt that, but when run my Windows application alongside my "old" libui.dll, the GUI program runs fine. When I exchange the libui.dll for the one linked in the second post of this thread, I get the "missing MSVCP140.dll" error.
Do you know a good source where I could download MSVCP140.dll as standalone file?
You may doubt that, but when run my Windows application alongside my "old" libui.dll, the GUI program runs fine.
That may be because it requires a version of MSVCP**.dll which is available on your system. Or yes, because it has been statically linked into it.
Do you know a good source where I could download MSVCP140.dll as standalone file?
It is included in the linked installer. I would never download it anywhere else than from Microsoft itself – there are versions available on shady sites. You may succeed in opening the installer with 7zip or something on Windows. Otherwise, you need a minimal Windows VM, install it there, and then fetch the file.
By the way, you can check dependencies of your DLL with
dumpbin.exe /dependents libui.dll
(given that you have Visual Studio installed; it's in the VC bin folder)
Thank you really a lot for your efforts, Araq.
I first tried to build for Linux but I get a bunch of linking errors. Will file an issue.