Can't compile with ldc in termux

_ZZ_ZZ_ZZ elnuggetdepoio at gmail.com
Wed Aug 11 19:10:09 UTC 2021


On Wednesday, 11 August 2021 at 18:58:16 UTC, jfondren wrote:
> confirm the location of ldc2.conf with `ldc2 -v`, then edit 
> that file. Mine was at ../usr/etc/ldc2.conf (relative to $HOME)

Mine was at `/data/data/com.termux/files/usr/etc/ldc2.conf` too.
Now, the file contains:
```
$ cat ldc2.conf
// See comments in driver/config.d in ldc source tree for grammar 
description of
// this config file.

// For cross-compilation, you can add sections for specific 
target triples by
// naming the sections as (quoted) regex patterns. See LDC's -v 
output
// (config line) to figure out your normalized triple, depending 
on the used
// -mtriple, -m32 etc. E.g.:
//
//     "^arm.*-linux-gnueabihf$": { … };
//     "86(_64)?-.*-linux": { … };
//     "i[3-6]86-.*-windows-msvc": { … };
//
// Later sections take precedence and override settings from 
previous matching
// sections while inheriting unspecified settings from previous 
sections.
// A default section always matches (treated as ".*") and is 
therefore usually
// the first section.
default:
{
     // default switches injected before all explicit command-line 
switches
     switches = [
         "-defaultlib=phobos2-ldc,druntime-ldc",
         "-link-defaultlib-shared=false",
     ];
     // default switches appended after all explicit command-line 
switches
     post-switches = [
         "-I%%ldcbinarypath%%/../include/d",
     ];
     // default directories to be searched for libraries when 
linking
     lib-dirs = [
         "%%ldcbinarypath%%/../lib",
     ];
     // default rpath when linking against the shared default libs
     rpath = "";
};

"^wasm(32|64)-":
{
     switches = [
         "-defaultlib=",
         "-L--export-dynamic",
     ];
     lib-dirs = [];
};
```
But... Now, what i do? :(
(Yes, i'm a beginner)


More information about the Digitalmars-d-learn mailing list