Thanks. Just to confirm my understanding - rustc deviates from the gcc way of generating object files and linking them together without first packaging them into libraries.
Is there a way to compile and link several .rs files into a single executable without an intermediate library? -Amitava On Tue, Apr 10, 2012 at 2:23 AM, Grahame Bowland <[email protected]>wrote: > Hi Amitava > > I've attached a simple template from a project I'm working on. I've got a > dependency "rust-csv" which I'm not building with cargo, but from a git > submodule. > > I use stamp files for the libraries, as the output files are versioned and > thus the filename produced changes. > > Hopefully this is of use. > > Grahame > > On 10 April 2012 05:26, Amitava Shee <[email protected]> wrote: > >> Is there a starter project or a Makefile? >> >> When I try to compile a source file without linking, I get the following >> error >> >> amitava:learn amitava$ rustc -g -c shape.rs >> shape.rs:1:0: 1:0 error: main function not found >> shape.rs:1 class shape { >> ^ >> error: aborting due to previous errors >> >> How do I compile several source files to obj files and then link them >> together into an executable? >> >> Thanks & Regards, >> Amitava Shee >> >> _______________________________________________ >> Rust-dev mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/rust-dev >> >> > -- Amitava Shee Software Architect There are two ways of constructing a software design. One is to make it so simple that there are obviously no deficiencies; the other is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. -- C. A. R. Hoare The Emperor's Old Clothes, CACM February 1981
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
