slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.94k stars 568 forks source link

slint core error for compilation #5334

Closed MohaBeacon closed 3 months ago

MohaBeacon commented 3 months ago
--> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/i-slint-core-1.6.0/accessibility.rs:15:38 15 #[derive(PartialEq, Eq, Copy, Clone, strum::Display)] ^^^^^^^^^^^^^^
= help: have you added the #[macro_use] on the module/import? = note: this error originates in the derive macro strum::Display (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items 6 + use alloc::format;

6 + use crate::format;

tronical commented 3 months ago

A recent release of strum-macros triggered this build issue. I think it will be fixed soon: https://github.com/Peternator7/strum/issues/359

Meanwhile I think you could try cargo update -p strum-macros --precise 0.26.2

MohaBeacon commented 3 months ago

| 5 | use slint::platform::software_renderer::Rgb565Pixel; | ^^^^^^^^^^^^^^^^^ could not find software_renderer in platform

error[E0432]: unresolved import slint::platform::software_renderer --> src/main.rs:46:33 | 46 | use slint::platform::{Platform, software_renderer::MinimalSoftwareWindow}; | ^^^^^^^^^^^^^^^^^ could not find software_renderer in platform

error[E0433]: failed to resolve: could not find software_renderer in platform --> src/main.rs:225:48 | 225 | ...ut [slint::platform::software_renderer::Rgb565Pixel], | ^^^^^^^^^^^^^^^^^ could not find software_renderer in platform

error[E0433]: failed to resolve: could not find software_renderer in platform --> src/main.rs:228:26 | 228 | ... slint::platform::software_renderer::LineBufferProvider for Displ... | ^^^^^^^^^^^^^^^^^ could not find software_renderer in platform

error[E0433]: failed to resolve: could not find software_renderer in platform --> src/main.rs:230:45 | 230 | ...l = slint::platform::software_renderer::Rgb565Pixel; | ^^^^^^^^^^^^^^^^^ could not find software_renderer in platform

error[E0433]: failed to resolve: could not find software_renderer in platform --> src/main.rs:256:35 | 256 | ...w = slint::platform::software_renderer::MinimalSoftwareWindow::new( | ^^^^^^^^^^^^^^^^^ could not find software_renderer in platform

error[E0433]: failed to resolve: could not find software_renderer in platform --> src/main.rs:257:26 | 257 | ... slint::platform::software_renderer::RepaintBufferType::ReusedBuffer | ^^^^^^^^^^^^^^^^^ could not find software_renderer in platform

error[E0433]: failed to resolve: could not find software_renderer in platform --> src/main.rs:261:45 | 261 | ... = [slint::platform::software_renderer::Rgb565Pixel(0); DISPLAY_WIDTH]; | ^^^^^^^^^^^^^^^^^ could not find software_renderer in platform

In docs it is available but in compilation i getting this error

ogoffart commented 3 months ago

you may need to enable the software_renderer feature

ogoffart commented 3 months ago

Closing this issue as a duplicate of https://github.com/Peternator7/strum/issues/359 ( And the second issue is https://github.com/slint-ui/slint/issues/5335 )