Closed Valakor closed 1 week ago
try adding "system:user32.lib" to the list in https://github.com/odin-lang/Odin/blob/3af9d31bd52c4714beddd2eaf154eadaf81d14b1/vendor/wgpu/wgpu.odin#L19
Whoops, I forgot to add to my original post that adding system:user32.lib
and system:gdi32.lib
fixes the compilation errors, I just haven't been able to set up a fork and make a pull request.
I did have this working while testing without these libraries, I took the needed libraries from https://github.com/gfx-rs/wgpu-native/blob/v0.19.4.1/examples/framework/CMakeLists.txt I will test it again and report back.
It may be because I was testing in combination with glfw, which adds the user32.lib dependency
Context
Expected Behavior
Importing and using the new wgpu bindings should compile successfully on supported platforms.
Current Behavior
Compilation fails on Windows 11 with 12 unresolved externals during linking.
Failure Information
Linking fails with 12 unresolved externals:
GetClientRect
,ChoosePixelFormat
,GetPixelFormat
,SetPixelFormat
,DescribePixelFormat
,RegisterClassExA
,DefWindowProcA
,DestroyWindow
,ReleaseDC
,GetDC
,SwapBuffers
, andCreateWindowExA
. I believe these references are coming from the internal wgpu_hal component.Steps to Reproduce
Failure Logs