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

No main generated by -main with dependencies #747

Closed
jmh530 opened this issue Apr 14, 2020 · 1 comment
Closed

No main generated by -main with dependencies #747

jmh530 opened this issue Apr 14, 2020 · 1 comment

Comments

@jmh530
Copy link

jmh530 commented Apr 14, 2020

For run.dlang.org, no main function is generated by the -main flag when there are dependencies.

This is likely related to issue 734 (i.e. perhaps all compiler flags aren't working with dependencies).

Consider

void foo() {}

compiled with -main has no error.

However, when compiling

/+dub.sdl:
dependency "automem" version="~>0.6.2"
+/
void foo() {}

with -main, then I get the error that

/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o:function _start: error: undefined reference to 'main'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
dmd failed with exit code 1.
@jmh530
Copy link
Author

jmh530 commented Apr 14, 2020

Closed in favor of 748

@jmh530 jmh530 closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant