cmd/link: too many error messages when missing func main #10978
Closed
Labels
Milestone
Comments
Do you think that the compiler should refuse to compile a package with the
import path (not just package name) without the main func?
This will catch the problem even earlier.
|
I don't know. Maybe, if -complete has been passed. (Although who writes a main function in assembly?) Or perhaps there are crazy, non-obvious uses in the dynamic linking world? |
Even for c-archive and c-shared build modes, we still require a dummy main.
|
See also #24809. The goal there, which dovetails with this issue, is to make it easier to diagnose the problem when you forget to have a |
Change https://golang.org/cl/113955 mentions this issue: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
With tip:
With 1.4, there were at least only two; the "call to external function" didn't show up. One would be enough, maybe even one that addresses this fairly special situation head on.
Low priority.
The text was updated successfully, but these errors were encountered: