Fixing Cross Compilation for Windows Executable - #249
Conversation
Add static linkage to only depend on DLL Name: KERNEL32.dll DLL Name: msvcrt.dll DLL Name: WS2_32.dll Rest all will be statically linked.
|
It looks like you are doing two unrelated things in one commit. It should be split in two. Then I don't see the benefit of switching from dynamic to static libraries. We generally use dynamic libraries, why would it be better to use static? On the And does it work with |
|
From the list of DDLs you posted, it seems that cygwin is not present. Maybe we should use it instead? Apparently there is a |
|
I am using mingw in linux for cross compilation on windows, not cygwin. As it is part of the windows only build invocation. The As to why i am preferring static linkage is because. Windows by default comes with these 3 dll (KERNEL32.dll, msvcrt.dll, WS2_32.dll). These stay on the C:\Windows\System32 path. |
|
Yes I think using Regarding static build, again I am not too aware of how software distribution generally works with Windows. If producing statically-linked binaries is common practice to distribute Windows software, we could do that too. I remember some software shipping with extra dlls in the same directory, but I guess the end result is the same as having everything into a single binary. On the other hand it also seems fine to me to tell users they should have the dlls of required dependencies installed. But we probably don't want to have an installer or something similar to deal with it. |
|
Changed to I too dont want to have to deal with an installer or a bundler so i rather have it statically linked. |
I had a bit of a trouble cross compiling the tools for usage on windows.
Two issues came up that are fixed with the two lines here.
Which was reduced to only the basic ones by static linking the libraries.