www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Setting up Dlang Environment

reply Mike Brown <mikey.be gmail.com> writes:
Hi All,

I've tried installing and setting up Dlang a few times now. I'm 
struggling to get it reliable and to a decent environment in 
place.

I don't really want to make this thread about specific issues - 
Id very much like to know if there's a decent tutorial or guide 
to setup Dlang?

* I'd like to get the basic's down solid (One of my issues is a 
linker issue on release but not debug, etc)

* A decent IDE which allows debugging, understanding the stack 
traces, step through etc?

* The package management, Should I be using DUB or doing 
packaging etc with make files etc?

I appriciate some of this is down to choice, but an idiots guide 
and recommended practises - to setting up the above so I can just 
get on with coding would be great.

Kind Regards,
Mike
Aug 17 2019
parent reply Andre Pany <andre s-e-a-p.de> writes:
On Saturday, 17 August 2019 at 20:42:41 UTC, Mike Brown wrote:
 Hi All,

 I've tried installing and setting up Dlang a few times now. I'm 
 struggling to get it reliable and to a decent environment in 
 place.

 I don't really want to make this thread about specific issues - 
 Id very much like to know if there's a decent tutorial or guide 
 to setup Dlang?

 * I'd like to get the basic's down solid (One of my issues is a 
 linker issue on release but not debug, etc)

 * A decent IDE which allows debugging, understanding the stack 
 traces, step through etc?

 * The package management, Should I be using DUB or doing 
 packaging etc with make files etc?

 I appriciate some of this is down to choice, but an idiots 
 guide and recommended practises - to setting up the above so I 
 can just get on with coding would be great.

 Kind Regards,
 Mike
Hi Mike, Which OS do you target? Setting up DMD on e.g. Ubuntu is just installing package build-essentials and installing the dmd deb file. On Windows you just extract the 7z file and add the bin path to th PATH environment variable. I tried so far IntelliJ IDEA and Visual Studio Code. Both are multi platform and free to use. Both supports debugging but here the details really depends on your OS. For Visual Studio Code there are even different D plugins available. I used vscode-dlang and it was just a fantastic experience. (I still prefer the kind of development flow IntelliJ provides, but Intellij D support is more complex to setup). If you target Windows, there is also Visual Studio, this plugin has no dub integration as far as I know. Kind regards Andre
Aug 17 2019
parent Mike Brown <mikey.be gmail.com> writes:
On Saturday, 17 August 2019 at 21:26:27 UTC, Andre Pany wrote:
 On Saturday, 17 August 2019 at 20:42:41 UTC, Mike Brown wrote:
 Hi All,

 I've tried installing and setting up Dlang a few times now. 
 I'm struggling to get it reliable and to a decent environment 
 in place.

 I don't really want to make this thread about specific issues 
 - Id very much like to know if there's a decent tutorial or 
 guide to setup Dlang?

 * I'd like to get the basic's down solid (One of my issues is 
 a linker issue on release but not debug, etc)

 * A decent IDE which allows debugging, understanding the stack 
 traces, step through etc?

 * The package management, Should I be using DUB or doing 
 packaging etc with make files etc?

 I appriciate some of this is down to choice, but an idiots 
 guide and recommended practises - to setting up the above so I 
 can just get on with coding would be great.

 Kind Regards,
 Mike
Hi Mike, Which OS do you target? Setting up DMD on e.g. Ubuntu is just installing package build-essentials and installing the dmd deb file. On Windows you just extract the 7z file and add the bin path to th PATH environment variable. I tried so far IntelliJ IDEA and Visual Studio Code. Both are multi platform and free to use. Both supports debugging but here the details really depends on your OS. For Visual Studio Code there are even different D plugins available. I used vscode-dlang and it was just a fantastic experience. (I still prefer the kind of development flow IntelliJ provides, but Intellij D support is more complex to setup). If you target Windows, there is also Visual Studio, this plugin has no dub integration as far as I know. Kind regards Andre
Hi Andre, Thank you for your reply! Windows is my target system. I have (hopefully) installed the d compiler toolchain, and Visual Studio Code - along with the recommended extension. I'm wondering on the build systems, I have read up on rdmd and dub. I think these are two seperate competing build systems? Which should I use, for which situations? I'd like to use Vibe, so I guess I need to use DUB? Can I use rdmd with dub dependencys? Kind Regards, Mike
Aug 25 2019