diff --git a/src/compiler.rs b/src/compiler.rs index f12ca67..4a9d0d5 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -41,7 +41,10 @@ impl Compiler { let mut o_s: Vec = Vec::new(); for file in self.needed_src.clone() { - let o_file = format!("{}.o", file.split(".").collect::>()[0]); + let o_file = format!( + "{}.o", + path::Path::new(&file).with_extension("").to_str().unwrap() + ); let o_path = path::Path::new(&o_file); let mut o_comp = o_path.components(); o_comp.next(); @@ -159,6 +162,7 @@ impl Compiler { .unwrap() .to_string(), ); + (src_file, header_files) } diff --git a/test/main b/test/main index 3e362a4..79bcc7e 100755 Binary files a/test/main and b/test/main differ