fltk-rs / fl2rust

A fluid (fltk ui designer) file to Rust transpiler
MIT License
52 stars 3 forks source link

Doesn't compatible with fltk-rs 1.4.10 #27

Closed AllenDang closed 1 year ago

AllenDang commented 1 year ago

Just invoke cargo generate --git https://github.com/fltk-rs/fl2rust-template, and run cargo build will fail.

Here is the error message:

Compiling fltk v1.4.10
warning: unused import: `prelude::*`
 --> src/main.rs:1:12
  |
1 | use fltk::{prelude::*, *};
  |            ^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0061]: this function takes 5 arguments but 1 argument was supplied
   --> src/main.rs:4:5
    |
4   |     fl2rust_macro::include_ui!("gui/mainview.fl");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ multiple arguments are missing
    |
note: associated function defined here
   --> /Users/allen/.cargo/registry/src/github.com-1ecc6299db9ec823/fltk-1.4.10/src/prelude.rs:475:8
    |
475 |     fn new<T: Into<Option<&'static str>>>(
    |        ^^^
    = note: this error originates in the macro `fl2rust_macro::include_ui` (in Nightly builds, run with -Z macro-backtrace for more info)
help: provide the arguments
    |
4   |     fl2rust_macro::include_ui!("gui/mainview.fl")(/* i32 */, /* i32 */, /* i32 */, /* i32 */, fl2rust_macro::include_ui!("gui/mainview.fl"));
    |                                                  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++