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

compile error in piet-direct2d #337

Closed
Aniki02 opened this issue Oct 13, 2020 · 4 comments
Closed

compile error in piet-direct2d #337

Aniki02 opened this issue Oct 13, 2020 · 4 comments

Comments

@Aniki02
Copy link

Aniki02 commented Oct 13, 2020

Hello.

Rustc is update to 1.47.0. I am using Windows 7 and my default toolchain is stable-x86_64-pc-windows-gnu.

I wanted to test cross platform with a little example. No worries when I compil in linux or macos, but in windows there is that compil error.
br C:\Users\Documents\projects\piet-crossplatform-example
$ cargo update
Updating crates.io index

br C:\Users\Documents\projects\piet-crossplatform-example
$ cargo clean

br C:\Users\Documents\projects\piet-crossplatform-example
$ cargo build
Compiling winapi-x86_64-pc-windows-gnu v0.4.0
Compiling winapi v0.3.9
Compiling libc v0.2.79
Compiling byteorder v1.3.4
Compiling bitflags v1.2.1
Compiling arrayvec v0.5.1
Compiling crc32fast v1.2.0
Compiling adler32 v1.2.0
Compiling cfg-if v0.1.10
Compiling lazy_static v1.4.0
Compiling utf16_lit v1.0.1
Compiling associative-cache v1.0.1
Compiling miniz_oxide v0.3.7
Compiling kurbo v0.6.3
Compiling piet v0.2.0-pre5
Compiling deflate v0.8.6
Compiling png v0.16.7
Compiling wio v0.2.2
Compiling dwrote v0.11.0
Compiling piet-direct2d v0.2.0-pre5
error[E0658]: procedural macros cannot be expanded to expressions
--> C:\Users.cargo\registry\src\github.com-1ecc6299db9ec823\piet-direct2d-0.2.0-pre5\src\dwrite.rs:39:32
|
39 | const DEFAULT_LOCALE: &[u16] = utf16_lit::utf16_null!("en-US");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #54727 rust-lang/rust#54727 for more information

error: aborting due to previous error

For more information about this error, try rustc --explain E0658.
error: could not compile piet-direct2d.

To learn more, run the command again with --verbose.

@cmyr
Copy link
Member

cmyr commented Oct 13, 2020

Are you sure you're running 1.47.0? This feature was only stabilized recently..

@Aniki02
Copy link
Author

Aniki02 commented Oct 14, 2020

this is the answer when I use rustup show :

$ rustup show
Default host: x86_64-pc-windows-gnu
rustup home: C:\Users.rustup

installed toolchains

stable-x86_64-pc-windows-gnu (default)
stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-gnu
1.7.0-x86_64-pc-windows-gnu

active toolchain

stable-x86_64-pc-windows-gnu (default)
rustc 1.47.0 (18bf6b4f0 2020-10-07)

@Aniki02
Copy link
Author

Aniki02 commented Oct 14, 2020

you can find my example with this link : https://gitlab.com/aniki02/piet-crossplatform-example

@Aniki02
Copy link
Author

Aniki02 commented Oct 14, 2020

You were right. Rustc version was the problem.

With rustup show, the rustc version was 1.47.0 but with rustc --version it was 1.43.0.
I fixed it by removing the second version of rustc and keeping that was save in /.cargo.

Thank you, I close this issue

@Aniki02 Aniki02 closed this as completed Oct 14, 2020
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

No branches or pull requests

2 participants