0 votes

I ran cargo build but this error pops up in the console:

PS C:\Users\#\Desktop\godot-rust\examples\hello_world> cargo build
   Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling gdnative-impl-proc-macros v0.9.3 (C:\Users\#\Desktop\godot-rust\impl\proc_macros)
   Compiling gdnative-derive v0.9.3 (C:\Users\#\Desktop\godot-rust\gdnative-derive)
   Compiling miniserde v0.1.13
   Compiling gdnative_bindings_generator v0.9.3 (C:\Users\#\Desktop\godot-rust\bindings_generator)
   Compiling gdnative-sys v0.9.3 (C:\Users\#\Desktop\godot-rust\gdnative-sys)
   Compiling gdnative-bindings v0.9.3 (C:\Users\#\Desktop\godot-rust\gdnative-bindings)
error: failed to run custom build command for `gdnative-sys v0.9.3 (C:\Users\#\Desktop\godot-rust\gdnative-sys)`

Caused by:
  process didn't exit successfully: `C:\Users\#\Desktop\godot-rust\target\debug\build\gdnative-sys-716dd102209477b8\build-script-build` (exit code: 101)
  --- stderr
  C:\Users\#\Desktop\godot-rust\gdnative-sys/godot_headers\gdnative/string.h:39:10: fatal error: 'wchar.h' file not found
  C:\Users\#\Desktop\godot-rust\gdnative-sys/godot_headers\gdnative/string.h:39:10: fatal error: 'wchar.h' file not found, err: true
  thread 'main' panicked at 'Unable to generate bindings: ()', gdnative-sys\build.rs:218:43
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

Any ideas?

Godot version 3.2.4 rc5
in Engine by (82 points)

1 Answer

+1 vote

From the looks of it, you either don't have the proper source files installed, or the Rust compiler can't find the "wchar.h" header file.

by (2,848 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.