학습/Rust 3

fatal error: 'stddef.h' file not found 에러 해결

Rust에서 autocxx를 해보는 도중에 위와 같은 에러가 발생했습니다. /usr/include/wchar.h:35:10: fatal error: 'stddef.h' file not found 에러가 발생한 코드는 아래와 같습니다.fn main() -> miette::Result { let path = std::path::PathBuf::from("src"); let mut b = autocxx_build::Builder::new("src/main.rs", [&path]).build().unwrap(); b.flag_if_supported("-std=c++17").compile("autoxxx-demo"); println!("cargo:rerun-if-changed=src/main..

학습/Rust 2025.01.30

Rust-analyzer 실행 시 cargo not found 에러 해결

위와 같이 "The terminal process failed to launch: Path to shell executable "cargo" does not exist." 라는 에러가 발생할 때 해결하는 방법을 공유하겠습니다. 저 에러는 rust-analyzer extension이 cargo를 찾지 못해서 발생하는 이슈입니다.rust-analyzer의 설정을 수정하면 해결됩니다. Extensions(확장) 메뉴에서 rust-analyzer 오른쪽의 톱니바퀴 모양을 누르고 Settings에 들어가면 오른쪽과 같이 나오는데요..Edit in settings.json을 눌러서 코드로 편집을 합니다. 아래 두 줄을 추가하면 문제가 해결됩니다. "rust-analyzer.restartServerOnConfigCh..

학습/Rust 2025.01.25
반응형