www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Cannot compile programs with ldc

reply _ZZ_ZZ_ZZ <elnuggetdepoio gmail.com> writes:
After having downloaded ldc in Termux, i have tried to create an 
example script (obviously, D-program) and after having compiled 
it, it gives an error.
```
$ vim example_program.d
$ ldc2 example_program.d
clang-12: error: invalid linker name in argument '-fuse-ld=bfd'
Error: /data/data/com.termux/files/usr/bin/cc failed with status: 
1
```
The example file contains...
```d
void main() {
     import std.stdio : writeln;
     writeln("Hello, world!");
}
```
I don't know what is the problem :( The device is arch armv71.
But I need help, please!
Aug 11
parent reply max haughton <maxhaton gmail.com> writes:
On Wednesday, 11 August 2021 at 17:35:01 UTC, _ZZ_ZZ_ZZ wrote:
 After having downloaded ldc in Termux, i have tried to create 
 an example script (obviously, D-program) and after having 
 compiled it, it gives an error.
 ```
 $ vim example_program.d
 $ ldc2 example_program.d
 clang-12: error: invalid linker name in argument '-fuse-ld=bfd'
 Error: /data/data/com.termux/files/usr/bin/cc failed with 
 status: 1
 ```
 The example file contains...
 ```d
 void main() {
     import std.stdio : writeln;
     writeln("Hello, world!");
 }
 ```
 I don't know what is the problem :( The device is arch armv71.
 But I need help, please!
Do you have build-essential installed? (I think that's the right name)
Aug 13
parent Tejas <notrealemail gmail.com> writes:
On Friday, 13 August 2021 at 13:53:55 UTC, max haughton wrote:
 On Wednesday, 11 August 2021 at 17:35:01 UTC, _ZZ_ZZ_ZZ wrote:
 After having downloaded ldc in Termux, i have tried to create 
 an example script (obviously, D-program) and after having 
 compiled it, it gives an error.
 ```
 $ vim example_program.d
 $ ldc2 example_program.d
 clang-12: error: invalid linker name in argument '-fuse-ld=bfd'
 Error: /data/data/com.termux/files/usr/bin/cc failed with 
 status: 1
 ```
 The example file contains...
 ```d
 void main() {
     import std.stdio : writeln;
     writeln("Hello, world!");
 }
 ```
 I don't know what is the problem :( The device is arch armv71.
 But I need help, please!
Do you have build-essential installed? (I think that's the right name)
His problem's solved: https://forum.dlang.org/thread/kejkbfqwkqfwzrbrvyzm forum.dlang.org
Aug 13