[Issue 9723] add missing main() when compiling exe with -unittest

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 14 14:55:26 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9723


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-03-14 14:55:25 PDT ---
How can you reasonably implement this if you pass object files or static
libraries to DMD which might contain main? E.g.:

foo.d:
import bar;
void main()
{
}

bar.d:
unittest
{
    assert(0);
}

$ dmd -c foo.d
$ dmd -unittest -ofbar.exe foo.d bar.obj

You could end up getting linker errors if DMD tries to add another main
function.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list