-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/link: too many error messages when missing func main #10978
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: |
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: