Windows 10 Linux Bash Shell: Compiling linux app on windows

ZombineDev via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 6 10:35:52 PDT 2016


On Saturday, 6 August 2016 at 17:18:51 UTC, Andre Pany wrote:
> Hi,
>
> I play around with the new windows 10 feature to run a linux
> sub system on windows.
>
> -> Installing dmd is working fine with the command
> curl -fsS https://dlang.org/install.sh | bash -s dmd
>
> -> Activating dmd is also working
> source ~/dlang/dmd-2.071.1/activate
>
> -> dmd can be started and shows correct version
> dmd --version.
>
> -> Compiling a hello world works, linking fails
> "dmd test -c" creates a test.o file
>
> but "dmd test" fails with error:
> cc: no such file or directory
> --- errorlevel 255
>
> Do you have an idea how to fix the linker issue?
>
> Kind regards
> André

Just like on a regular linux distro, you need to have installed 
standard development tools such as a C compiler toolchain. Since 
the install script on dlang's homepage is not a deb package it 
doesn't verify if those dependencies are fulfilled.

I think running "sudo apt-get install build-essential" in 
bash.exe should do it (install C compiler and a "cc" alias to it).

The other option is to download the Ubuntu/Debian x86_64 .deb 
package and do "sudo dpkg -i" on it: 
http://downloads.dlang.org/releases/2.x/2.071.1/dmd_2.071.1-0_amd64.deb and it will find the missing dependencies, so you can later install them, like described here: http://superuser.com/questions/196864/how-to-install-local-deb-packages-with-apt-get



More information about the Digitalmars-d-learn mailing list