This program:
fn main() {
defmt::info!("hello");
println!("hello");
}
fails to link if you use defmt v0.2.0
$ cargo r
(..)
= note: /usr/bin/ld: (..)/target/debug/deps/libdefmt-00ba9b2b47686b1f.rlib(defmt-00ba9b2b47686b1f.defmt.bhjss6u8-cgu.12.rcgu.o): in function `defmt::export::acquire':
(..)/defmt-0.2.0/src/export.rs:36: undefined reference to `_defmt_acquire'
/usr/bin/ld: (..)/target/debug/deps/libdefmt-00ba9b2b47686b1f.rlib(defmt-00ba9b2b47686b1f.defmt.bhjss6u8-cgu.12.rcgu.o): in function `defmt::export::release':
(..)/defmt-0.2.0/src/export.rs:48: undefined reference to `_defmt_release'
/usr/bin/ld: (..)/target/debug/deps/libdefmt-00ba9b2b47686b1f.rlib(defmt-00ba9b2b47686b1f.defmt.bhjss6u8-cgu.12.rcgu.o): in function `defmt::export::timestamp':
(..)/defmt-0.2.0/src/export.rs:60: undefined reference to `_defmt_timestamp'
collect2: error: ld returned 1 exit status
but links and runs fine if you use defmt v0.1.3
$ cargo r
(..)
Running `target/debug/hello`
hello
note that all logs are disabled in both cases (no Cargo features were added to the crate's Cargo.toml)
This program:
fails to link if you use
defmtv0.2.0but links and runs fine if you use
defmtv0.1.3note that all logs are disabled in both cases (no Cargo features were added to the crate's Cargo.toml)