Skip to content

glfw in ebiten on Win32 is not self contained #1763

@divVerent

Description

@divVerent

If I build a win32 (GOOS=windows, GOARCH=386) binary with ebiten, it does not run on a fresh Windows system as it complains that libgcc_s_dw2-1.dll is missing.

Note that with GOARCH=amd64, it works.

Suspecting that the glfwDLLCompressed for Win32 requires this extra DLL, while the Win64 one does not.

And indeed:

[rpolzer@co2 drive_c]$ objdump -x './users/rpolzer/Local Settings/Application Data/ebiten/757fe85fcdb46e92da9256bffb1c0838472821e069c26b743c07a801df38504c.dll'|grep 'DLL Name:'
	DLL Name: GDI32.dll
	DLL Name: KERNEL32.dll
	DLL Name: msvcrt.dll
	DLL Name: SHELL32.dll
	DLL Name: USER32.dll
	DLL Name: libgcc_s_dw2-1.dll
[rpolzer@co2 drive_c]$ objdump -x './users/rpolzer/Local Settings/Application Data/ebiten/de55a18e5ffe69870a244951d2aca066d891af7c89c321865c701e82b015c9f5.dll' | grep 'DLL Name:'
	DLL Name: GDI32.dll
	DLL Name: KERNEL32.dll
	DLL Name: msvcrt.dll
	DLL Name: SHELL32.dll
	DLL Name: USER32.dll

For some reason the 64bit version only requires things that come with Windows, while the 32bit version requires this additional DLL.

Can this be fixed? From what I read on the web, maybe all it takes is passing -static-libgcc when linking the DLL.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions