You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo build main
Compiling testclient v0.1.0 ...
error: environment variable `OUT_DIR` not defined at compile time
--> testclient/src/protocol.rs:1:18
|
1 | include!(concat!(env!("OUT_DIR"), "/protocol.rs"));
| ^^^^^^^^^^^^^^^
|
= help: Cargo sets build script variables at run time. Use `std::env::var("OUT_DIR")` instead
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `testclient` (bin "testclient") due to 1 previous error
But when I do that, I obviously get the error:
1 | include!(concat!(std::env::var("OUT_DIR"), "/protocol.rs"));
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only literals (like `"foo"`, `-42` and `3.14`) can be passed to `concat!()`
How do I use this project?
The text was updated successfully, but these errors were encountered:
When I follow your instructions and create this file:
I get this error:
But when I do that, I obviously get the error:
How do I use this project?
The text was updated successfully, but these errors were encountered: