You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ rustc --crate-type=bin,rlib a.rs
$ rustc b.rs --extern a=liba.rlib
error: linking with `cc` failed: exit code: 1
|
= note: "cc" ...
= note: /tmp/rlibtest/liba.rlib(a.0.o): In function `main':
a.cgu-0.rs:(.text.main+0x0): multiple definition of `main'
b.0.o:b.cgu-0.rs:(.text.main+0x0): first defined here
collect2: error: ld returned 1 exit status
error: aborting due to previous error
The text was updated successfully, but these errors were encountered:
jethrogb
changed the title
rustc injects main in all outputs when specifying bin crate type
rustc injects main in all outputs when specifying “bin” crate type
Nov 23, 2016
See source code for a.rs & b.rs at the end of this issue.
expected behavior
I'd expect this:
to generate the same output as:
actual behavior
But it does not:
is all peachy, versus:
source files
The text was updated successfully, but these errors were encountered: