Skip to content

Fails during run when trying to add a Menu #40

Open
@golden-moss

Description

@golden-moss

Using the basic example as a baseline to make sure the error wasn't on my end, I tried to add a menu, changing the window type to HasMenubar and adding let menu = Menu::new(&ui, "Test Menu"); This complies without issues, but fails instantly at runtime. This happens whenever a new menu is defined.

   Compiling iui v0.3.0 (file:///X:/Documents/code_projects/libui-rs/iui)
warning: unused variable: `menu`
  --> examples\basic.rs:19:13
   |
19 |     let mut menu = Menu::new(&ui, "Test Menu");
   |             ^^^^ help: consider using `_menu` instead
   |
   = note: #[warn(unused_variables)] on by default

warning: variable does not need to be mutable
  --> examples\basic.rs:19:9
   |
19 |     let mut menu = Menu::new(&ui, "Test Menu");
   |         ----^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: #[warn(unused_mut)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 0.59s
     Running `target\debug\examples\basic.exe`
error: process didn't exit successfully: `target\debug\examples\basic.exe` (exit code: 2147483651)
PS X:\Documents\code_projects\libui-rs\iui> cargo run --example basic
   Compiling iui v0.3.0 (file:///X:/Documents/code_projects/libui-rs/iui)
warning: unused variable: `menu`
  --> examples\basic.rs:19:9
   |
19 |     let menu = Menu::new(&ui, "Test Menu");
   |         ^^^^ help: consider using `_menu` instead
   |
   = note: #[warn(unused_variables)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 0.56s
     Running `target\debug\examples\basic.exe`
error: process didn't exit successfully: `target\debug\examples\basic.exe` (exit code: 2147483651)
PS X:\Documents\code_projects\libui-rs\iui> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    c-bugBug - some feature is not working as expectedp-highHigh Priority

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions