digitalmars.D.learn - Windows 10 Linux Bash Shell: Compiling linux app on windows
- Andre Pany (17/17) Aug 06 2016 Hi,
- Rattle Weird Hole (2/19) Aug 06 2016 ld must be found in the environment ?
- Andre Pany (7/8) Aug 06 2016 Yes ld was missing, by installing the build-essentials dmd is
- ZombineDev (10/27) Aug 06 2016 Just like on a regular linux distro, you need to have installed
- cym13 (7/12) Aug 06 2016 Just a side note but it's a really bad idea to pipe curl in bash
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é
Aug 06 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éld must be found in the environment ?
Aug 06 2016
On Saturday, 6 August 2016 at 17:26:05 UTC, Rattle Weird Hole wrote:ld must be found in the environment ?Yes ld was missing, by installing the build-essentials dmd is running fine: sudo apt-get install build-essential Kind regards André
Aug 06 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
Aug 06 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 dmdJust a side note but it's a really bad idea to pipe curl in bash as it opens the door to remote unknown code exploitation. Even checking what curl returns beforehand isn't enough as a piped curl is distinguishable server-side so a different script could be provided dynamically. (Ok, with dlang.org there shouldn't be much problem but still)
Aug 06 2016