Skip to content

请问编译server时变量找不到: variant or associated item not found in Union help: there is a variant with a similar name: RegisterPeer #9

@tpcodehub

Description

@tpcodehub

在windows上编译server报错, 请问编译server时变量找不到, 是怎么回事, 都是同一类型的错误

image

PS E:\BaiduNetdiskDownload\pierces\rustdesk\rustdesk_server_agent\server_src> cargo build
warning: unused import: fs
--> libs\hbb_common\src\config.rs:6:5
|
6 | fs,
| ^^
|
= note: #[warn(unused_imports)] on by default

warning: hbb_common (lib) generated 1 warning (run cargo fix --lib -p hbb_common to apply 1 suggestion)
Compiling server v1.0.0 (E:\BaiduNetdiskDownload\pierces\rustdesk\rustdesk_server_agent\server_src)
error[E0599]: no variant or associated item named register_peer found for enum hbb_common::rendezvous_proto::rendezvous_message::Union in the current scope
--> src\bin\main3.rs:135:45
|
135 | Some(rendezvous_message::Union::register_peer(rp)) => {
| ^^^^^^^^^^^^^
| |
| variant or associated item not found in Union
| help: there is a variant with a similar name: RegisterPeer

error[E0599]: no variant or associated item named register_pk found for enum hbb_common::rendezvous_proto::rendezvous_message::Union in the current scope
--> src\bin\main3.rs:141:45
|
141 | Some(rendezvous_message::Union::register_pk(_)) => {
| ^^^^^^^^^^^
| |
| variant or associated item not found in Union
| help: there is a variant with a similar name: RegisterPk

error[E0599]: no variant or associated item named punch_hole_request found for enum hbb_common::rendezvous_proto::rendezvous_message::Union in the current scope
--> src\bin\main3.rs:53:61
|
53 | ... Some(rendezvous_message::Union::punch_hole_request(ph)) => {
| ^^^^^^^^^^^^^^^^^^
| |
| variant or associated item not found in Union
| help: there is a variant with a similar name: PunchHoleRequest

error[E0599]: no variant or associated item named relay_response found for enum hbb_common::rendezvous_proto::rendezvous_message::Union in the current scope
--> src\bin\main3.rs:64:61
|
64 | ... Some(rendezvous_message::Union::relay_response(_)) => {
| ^^^^^^^^^^^^^^
| |
| variant or associated item not found in Union
| help: there is a variant with a similar name: RelayResponse

For more information about this error, try rustc --explain E0599.
error: could not compile server (bin "main3") due to 4 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions