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

The basic starter template does not compile. #41

Open
wegfawefgawefg opened this issue Mar 16, 2024 · 0 comments
Open

The basic starter template does not compile. #41

wegfawefgawefg opened this issue Mar 16, 2024 · 0 comments

Comments

@wegfawefgawefg
Copy link

egui_macroquad::ui(|egui_ctx| {
            egui::Window::new("egui ❤ macroquad")
                .show(egui_ctx, |ui| {
                    ui.label("Test");
                });
        });

the error is as follows :

mismatched types
`egui_macroquad::egui::Context` and `egui::context::Context` have similar names, but are actually distinct types
perhaps two different versions of crate `egui` are being used?rustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B6%5D?6#file%3A%2F%2F%2Fhome%2Fvega%2FCoding%2FTraining%2Ftrying-wasm-macroquad%2Fapp%2Fsrc%2Fmain.rs)
main.rs(34, 35): arguments to this method are incorrect
context.rs(225, 1): `egui_macroquad::egui::Context` is defined in crate `egui`
context.rs(684, 1): `egui::context::Context` is defined in crate `egui`
demo_app_windows.rs(176, 12): method defined here

the egui_ctx is defined both in the egui crate and the macroquad egui binding.
Fiddling with the versions of egui does not fix it.

There is no example toml, but I have tried every variation of importing egui, no egui, just this library, the egui-miniquad lib, etc.

The egui_ctx type is ambiguous to rustc. Even with explicit importing of egui from this library, it still mows over the egui_ctx definition.

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

1 participant