[rust-dev] How to build multiple .rs source files?

Grahame Bowland grahame at angrygoats.net
Mon Apr 9 23:23:29 PDT 2012

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

I use stamp files for the libraries, as the output files are versioned and
thus the filename produced changes.

Hopefully this is of use.


On 10 April 2012 05:26, Amitava Shee <amitava.shee at gmail.com> 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
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20120410/9ab322b9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 510 bytes
Desc: not available
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20120410/9ab322b9/attachment.obj>

More information about the Rust-dev mailing list