eliemichel/WebGPU-Cpp

Current header now erroring with wgpu-native

Closed this issue · 2 comments

I just updated to the latest version of wgpu-native for MacOS, and I'm getting a bunch of errors now, including:

/usr/local/include/webgpu/webgpu.hpp:664:35: error: use of undeclared identifier 'WGPUSType_RequiredLimitsExtras'; did you mean 'RequiredLimitsExtras'?
  664 |         ENUM_ENTRY(RequiredLimitsExtras, WGPUSType_RequiredLimitsExtras)
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          RequiredLimitsExtras

It looks like perhaps the naming has changed?

This was also after editing the header to remove this line, which also generates an error:

/usr/local/include/webgpu/webgpu.hpp:38:10: fatal error: 'wgpu/wgpu.h' file not found
   38 | #include <wgpu/wgpu.h>  // NB: Will soon revert to webgpu/wgpu.h
      |          ^~~~~~~~~~~~~
1 error generated.

Hello, instead of removing that line, change it to #include <webgpu/wgpu.h> as suggested in the comment.

If it is not enough, it means you have a mismatch between your version of webgpu.h/wgpu.h and the webgpu.hpp wrapper. You can check version nombers in the wgpu-native-tag.txt file that comes with webgpu.hpp, and if needed re-generate this wrapper using the web tool of generate.py!

Fixed a couple of commits ago