If I compile this simple program `fn main() { println!("Hello"); }` with `rustc test.rs -o test` then I can run it with `./test`, but double clicking it in the file manager gives this error: `Could not display "test". There is no application installed for "shared library" file.` Running `file test` seems to agree: `test: ELF 64-bit LSB shared object...`.

How can I get rustc, and also tools that use it such as cargo, to produce executables rather than shared objects?

I am using 64-bit Linux (Ubuntu 14.10).

EDIT: I have [posted](http://discuss.rust-lang.org/t/why-does-rust-produce-shared-libs-rather-than-executables-on-linux/998) on the [Rust forum](http://discuss.rust-lang.org) about this.

EDIT@: So it turns out this is an issue with the `file` executable.