2 ms·
Thanks for checking up, I did it on my Winows 10 machine, it's kinda too late to start it up now and run it but I'll do it tomorrow and post both the code and
by Alifatisk 3y ago
Thanks for checking up,
I did it on my Winows 10 machine, it's kinda too late to start it up now and run it but I'll do it tomorrow and post both the code and the error message.
Update:
I did this quickly on my MBP.
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
puts("Hello, world!");
return EXIT_SUCCESS;
}
Command:
dmd test.c
Error:
ld: address=0x0 points to section(2) with no content in '/Users/james/.asdf/installs/dmd/2.107.0/dmd2/osx/lib/libphobos2.a[3233](config_a98_4c3.o)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: linker exited with status 1
- WalterBright 3y agoThank you. Did you mean to #include stdio.h twice?
- Alifatisk 3y agoNo I did not mean to include stdio.h twice. I don’t think I am doing that either?
- WalterBright 3y agoSorry, my bad, I misread it.
- WalterBright 3y agoI'm wondering why you're linking with an OSX library on Windows 10!
- Alifatisk 3y agoI’m not, sorry for the confusion. I compiled the code on my macbook instead because it was too late to start my win 10 computer. I think windows threw a similar error.
- WalterBright 3y agoI added your code to the D test suite. It passes on all supported platforms, including Windows and OSX. I am at a loss why it isn't working for you. https://github.com/dlang/dmd/pull/16238 https://github.com/dlang/dmd/pull/16238
- Alifatisk 3y agoHere's the pipeline spitting out the same error as on my macbook did. https://github.com/dlang/dmd/actions/runs/8023469412/job/21919998135#step:9:56 https://github.com/dlang/dmd/actions/runs/8023469412/job/219...