www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Undefined reference - built from source DMD

reply Stefanos Baziotis <sdi1600105 di.uoa.gr> writes:
I don't if this the right group to post this.

DMD built from source fails to link / find `main`. The error is:
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function
`_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

Does anyone know how this could have happened?
Sep 10 2019
parent reply Nicholas Wilson <iamthewilsonator hotmail.com> writes:
On Tuesday, 10 September 2019 at 11:12:30 UTC, Stefanos Baziotis 
wrote:
 I don't if this the right group to post this.

 DMD built from source fails to link / find `main`. The error is:
 /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function
`_start':
 (.text+0x20): undefined reference to `main'
 collect2: error: ld returned 1 exit status
 Error: linker exited with status 1

 Does anyone know how this could have happened?
Is this you have built your own DMD and using it to compile a test program and you get that error, or you get that error trying to build DMD?
Sep 10 2019
parent reply Stefanos Baziotis <sdi1600105 di.uoa.gr> writes:
On Tuesday, 10 September 2019 at 14:47:00 UTC, Nicholas Wilson 
wrote:
 Is this you have built your own DMD
Yes
 and using it to compile a test program and you get that error, 
 or you get that error trying to build DMD?
Both. I get that error trying to compile _any_ program.
Sep 10 2019
parent reply Stefanos Baziotis <sdi1600105 di.uoa.gr> writes:
On Tuesday, 10 September 2019 at 15:01:11 UTC, Stefanos Baziotis 
wrote:
 On Tuesday, 10 September 2019 at 14:47:00 UTC, Nicholas Wilson 
 wrote:
 Is this you have built your own DMD
Yes
I have branched to an old PR (4 months ago) and the problem doesn't exist.
Sep 10 2019
parent Stefanos Baziotis <sdi1600105 di.uoa.gr> writes:
On Wednesday, 11 September 2019 at 02:09:42 UTC, Stefanos 
Baziotis wrote:
 I have branched to an old PR (4 months ago) and the problem 
 doesn't exist.
For clarification, the problem doesn't exist _in that_ branch. On my current new branch, I still haven't been able to solve it.
Sep 11 2019