iced icon indicating copy to clipboard operation
iced copied to clipboard

Fail to compile example integration_opengl/

Open chem-william opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Is this issue related to iced?

  • [X] My hardware is compatible and my graphics drivers are up-to-date.

What happened?

When running the integration_opengl example, I'm met with the following error:

error[E0432]: unresolved import `iced_winit::application::Application`
 --> glutin/src/application.rs:6:9
  |
6 | pub use iced_winit::application::Application;
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `Application` in `application`

error[E0433]: failed to resolve: could not find `State` in `application`
   --> glutin/src/application.rs:201:34
    |
201 |     let mut state = application::State::new(&application, context.window());
    |                                  ^^^^^ not found in `application`
    |
help: consider importing one of these items
    |
2   | use crate::overlay::menu::State;
    |
2   | use crate::program::State;
    |
2   | use crate::user_interface::State;
    |
2   | use crate::widget::button::State;
    |
      and 32 other candidates
help: if you import `State`, refer to it directly
    |
201 -     let mut state = application::State::new(&application, context.window());
201 +     let mut state = State::new(&application, context.window());
    |

error[E0425]: cannot find function `run_command` in module `application`
   --> glutin/src/application.rs:204:18
    |
204 |     application::run_command(
    |                  ^^^^^^^^^^^ not found in `application`

error[E0425]: cannot find function `build_user_interface` in module `application`
   --> glutin/src/application.rs:220:40
    |
220 |         ManuallyDrop::new(application::build_user_interface(
    |                                        ^^^^^^^^^^^^^^^^^^^^ not found in `application`

error[E0425]: cannot find function `update` in module `application`
   --> glutin/src/application.rs:267:34
    |
267 |                     application::update(
    |                                  ^^^^^^ not found in `application`
    |
help: consider importing one of these items
    |
2   | use crate::widget::button::update;
    |
2   | use crate::widget::pane_grid::update;
    |
2   | use crate::widget::pick_list::update;
    |
2   | use crate::widget::scrollable::update;
    |
      and 14 other candidates
help: if you import `update`, refer to it directly
    |
267 -                     application::update(
267 +                     update(
    |

error[E0425]: cannot find function `build_user_interface` in module `application`
   --> glutin/src/application.rs:287:56
    |
287 |                         ManuallyDrop::new(application::build_user_interface(
    |                                                        ^^^^^^^^^^^^^^^^^^^^ not found in `application`

error[E0425]: cannot find function `requests_exit` in module `application`
   --> glutin/src/application.rs:408:33
    |
408 |                 if application::requests_exit(&window_event, state.modifiers())
    |                                 ^^^^^^^^^^^^^ not found in `application`

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `iced_glutin` due to 7 previous errors

What is the expected behavior?

That the examples compiles and runs flawlessly. Running the example integration_wgpu works fine.

Version

master

Operative System

Linux

Do you have any log output?

No response

chem-william avatar Oct 25 '22 19:10 chem-william

cargo build --package=integration_opengl fails but cargo build --all succeeds, tested on Windows.

icedrocket avatar Oct 27 '22 13:10 icedrocket

I can confirm that with cargo build --all there's no error. I'm on Ubuntu 22.04. Yet, even after building all examples, I'm still not able to run the specific example (using cargo run --package integration_opengl. I get the same error

chem-william avatar Oct 27 '22 14:10 chem-william