Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed several compiling errors such as file path, types, lambda etc. #27

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

disini
Copy link

@disini disini commented Dec 26, 2024

fixed several compiling errors such as file path, types, lambda etc.

  1. hello_webgpu.cpp:2:10: fatal error: webgpu/webgpu_cpp_print.h: There is no such file or directory
    2 | #include <webgpu/webgpu_cpp_print.h>
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    Compile terminated.
    gmake[2]: *** [CMakeFiles/hello_webgpu.dir/build.make:79: CMakeFiles/hello_webgpu.dir/hello_webgpu.cpp.o] Error 1
    gmake[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/hello_webgpu.dir/all] error 2
    gmake: *** [Makefile:91:all] error 2

Translated with DeepL.com (free version)

  1. hello_webgpu.cpp:24:27: error: invalid user-defined conversion from ‘main(int, char**)::<lambda(WGPURequestAdapterStatus, WGPUAdapter, const char*, void*)>’ to ‘wgpu::RequestAdapterCallback’ {aka ‘void ()(WGPURequestAdapterStatus, WGPUAdapterImpl, WGPUStringView, void*)’} [-fpermissive]
    24 | callbackInfo.callback = [](WGPURequestAdapterStatus status,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    25 | WGPUAdapter adapter, const char *message,
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    26 | void *userdata) {
    | ~~~~~~~~~~~~~~~~~
    27 | if (status != WGPURequestAdapterStatus_Success) {
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    28 | std::cerr << "Failed to get an adapter:" << message;
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    29 | return;
    | ~~~~~~~
    30 | }
    | ~
    31 | *static_cast<wgpu::Adapter *>(userdata) = wgpu::Adapter::Acquire(adapter);
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    32 | };

Copy link

google-cla bot commented Dec 26, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link

👋 Thanks for your contribution! Your PR has been imported to Gerrit.
Please visit https://dawn-review.googlesource.com/c/dawn/+/220536 to see it and CC yourself on the change.
After iterating on feedback, please comment on the Gerrit review to notify reviewers.
All reviews are handled within Gerrit, any comments on the GitHub PR may be missed.
You can continue to upload commits to this PR, and they will be automatically imported
into Gerrit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant