Skip to content
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

RDMD: Emit error on missing or unexpected main function #93

Open
mdparker opened this issue Jun 21, 2023 · 0 comments
Open

RDMD: Emit error on missing or unexpected main function #93

mdparker opened this issue Jun 21, 2023 · 0 comments

Comments

@mdparker
Copy link
Member

andrej.mitrovich reported this on 2013-03-10T11:54:06Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=9683

CC List

  • razvan.nitu1305

Description

After dlang/dmd#1732 is pulled RDMD should be able to the following:

  1. Emit an error on missing main if 'entry' is not found. This will avoid displaying linker error messages.

  2. When RDMD supports building libraries (e.g. using the -lib or maybe --lib/--static switch) it should warn or error if a 'main' function is found. This will avoid linker errors for multiply defined 'main' symbols when the user links the built static library with his code at a later point.

  3. When RDMD supports building DLLs it should verify there's an entry point and that the entry point is dllmain.

Comments

andrej.mitrovich commented on 2013-03-10T15:17:46Z

Actually this can only work if there are no static library or object files passed on the command line to RDMD, since they could potentially contain 'main.'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant