fltk-rs / fltk-flow Goto Github PK
View Code? Open in Web Editor NEWA flow widget for fltk-rs (wraps Fl_Flow).
License: MIT License
A flow widget for fltk-rs (wraps Fl_Flow).
License: MIT License
cfl_widget.hpp was moved to the source directory in more recent versions of cfltk so there is no way to instantiate the Widget_Derived template necessary for WIDGET_CLASS and WIDGET_DEFINE. If cfltk was meant to allow creation of custom wrappers that change totally broke it.
感谢作者提供这个神奇的组件,但是我在引入Cargo.toml编译时出现错误,导致无法编译成功。
请帮忙提供指引信息,如何解决问题。
基本环境:
cargo / rustc 1.71
[dependencies]
fltk = "^1.4"
tokio = { version = "1.29.1", features = ["full"] }
fltk-flow = "0.2.0"
执行编译:
Compiling libc v0.2.147
Compiling cc v1.0.79
Compiling autocfg v1.1.0
Compiling cfg-if v1.0.0
Compiling proc-macro2 v1.0.66
Compiling crossbeam-utils v0.8.16
Compiling unicode-ident v1.0.11
Compiling parking_lot_core v0.9.8
Compiling paste v1.0.14
Compiling scopeguard v1.2.0
Compiling smallvec v1.11.0
Compiling fltk-build v0.1.1
Compiling ttf-parser v0.19.1
Compiling bitflags v2.3.3
Compiling pin-project-lite v0.2.10
Compiling bytes v1.4.0
Compiling lock_api v0.4.10
Compiling tokio v1.29.1
Compiling cmake v0.1.50
Compiling crossbeam-channel v0.5.8
Compiling fltk-sys v1.4.8
Compiling quote v1.0.32
Compiling syn v2.0.27
Compiling signal-hook-registry v1.4.1
Compiling num_cpus v1.16.0
Compiling socket2 v0.4.9
Compiling mio v0.8.8
Compiling parking_lot v0.12.1
Compiling tokio-macros v2.1.0
Compiling fltk v1.4.8
Compiling fltk-flow v0.2.0
error[E0425]: cannot find function, tuple struct or tuple variant `Fl_Flow_set_damage_area` in this scope
--> /home/foo/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/fltk-flow-0.2.0/src/lib.rs:19:1
|
19 | fltk::macros::widget::impl_widget_ext!(Flow, Fl_Flow);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the macro `fltk::macros::widget::impl_widget_ext` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> /home/foo/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/fltk-flow-0.2.0/src/lib.rs:19:1
|
19 | fltk::macros::widget::impl_widget_ext!(Flow, Fl_Flow);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected `()`, found integer
| expected because this is `()`
|
= note: this error originates in the macro `fltk::macros::widget::impl_widget_ext` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no function or associated item named `default` found for struct `Flow` in the current scope
--> /home/foo/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/fltk-flow-0.2.0/src/lib.rs:20:1
|
13 | pub struct Flow {
| --------------- function or associated item `default` not found for this struct
...
20 | fltk::macros::widget::impl_widget_base!(Flow, Fl_Flow);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `Flow`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `default`, perhaps you need to implement it:
candidate #1: `std::default::Default`
= note: this error originates in the macro `fltk::macros::widget::impl_widget_base` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find function, tuple struct or tuple variant `Fl_Flow_super_draw` in this scope
--> /home/foo/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/fltk-flow-0.2.0/src/lib.rs:20:1
|
20 | fltk::macros::widget::impl_widget_base!(Flow, Fl_Flow);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the macro `fltk::macros::widget::impl_widget_base` (in Nightly builds, run with -Z macro-backtrace for more info)
Some errors have detailed explanations: E0308, E0425, E0599.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `fltk-flow` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
Hi,
just tried the example on the front page of fltk-flow, but it doesn't compile because of this error :
Compiling fltk_tst_flow v0.1.0 (C:\Data\Dev\rust_tst\fltk_tst_flow)
error[E0599]: no function or associated item named `default_fill` found for struct `Flow` in the current scope
--> src\main.rs:10:26
|
10 | let mut flow = Flow::default_fill();
| ^^^^^^^^^^^^ function or associated item not found in `Flow`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
3 | use fltk::prelude::WidgetBase;
|
For more information about this error, try `rustc --explain E0599`.
error: could not compile `fltk_tst_flow` due to previous error
what did I miss ?
thanks..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.