diff --git a/src/main.rs b/src/main.rs index d1a8e59..af71dca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,6 +111,8 @@ fn check_rust_version() { } fn build_elf(args: std::iter::Skip) { + let rustflags = format!("-L{}/libctru/lib -lctru ", env::var("DEVKITPRO").unwrap()); + let mut process = Command::new("cargo") .arg("build") .arg("-Z") @@ -118,6 +120,7 @@ fn build_elf(args: std::iter::Skip) { .arg("--target") .arg("armv6k-nintendo-3ds") .args(args) + .env("RUSTFLAGS", rustflags) .stdin(Stdio::inherit()) .stdout(Stdio::inherit()) .stderr(Stdio::inherit())