www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Steps to build Hello World with Vibe.d and VisualD

reply Brother Bill <foo bar.com> writes:
VisualD is up and running.
I can build vibe.d outside of VisualD and it runs OK.

What I can't do is build, debug and run Vibe.d within VisualD 
inside Visual Studio 2015 Community Edition.

I get this error when I attempt to build the initial Hello World 
inside VisualD:
   Error: module d is in file 'vibe\d.d which cannot be read

Please provide step by step instructions of how to create a 
Visual Studio Solution/Project, add vibe.d to it, and run Hello 
World within VisualD.
Mar 05 2016
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 06.03.2016 01:20, Brother Bill wrote:
 VisualD is up and running.
 I can build vibe.d outside of VisualD and it runs OK.

 What I can't do is build, debug and run Vibe.d within VisualD inside
 Visual Studio 2015 Community Edition.

 I get this error when I attempt to build the initial Hello World inside
 VisualD:
    Error: module d is in file 'vibe\d.d which cannot be read

 Please provide step by step instructions of how to create a Visual
 Studio Solution/Project, add vibe.d to it, and run Hello World within
 VisualD.
I'm not a user of vibe.d, but AFAICT the expected usage is to let dub generate the solution for you with "dub generate visuald". Even if you don't want to use the generated project, it will show you how to set the import path to find the vibe.d sources (which leads to the error above), add vibe.d version identifiers and library files for linking.
Mar 06 2016
parent reply Brother Bill <foo bar.com> writes:
On Sunday, 6 March 2016 at 08:47:33 UTC, Rainer Schuetze wrote:
 On 06.03.2016 01:20, Brother Bill wrote:
 VisualD is up and running.
 I can build vibe.d outside of VisualD and it runs OK.

 What I can't do is build, debug and run Vibe.d within VisualD 
 inside
 Visual Studio 2015 Community Edition.

 I get this error when I attempt to build the initial Hello 
 World inside
 VisualD:
    Error: module d is in file 'vibe\d.d which cannot be read

 Please provide step by step instructions of how to create a 
 Visual
 Studio Solution/Project, add vibe.d to it, and run Hello World 
 within
 VisualD.
I'm not a user of vibe.d, but AFAICT the expected usage is to let dub generate the solution for you with "dub generate visuald". Even if you don't want to use the generated project, it will show you how to set the import path to find the vibe.d sources (which leads to the error above), add vibe.d version identifiers and library files for linking.
This is good. Success now. Here are the step by step instructions. I have all my vibed projects in D:\D\vibed\ which is my starting directory path. You should substitute your directory path, such as C:\D\vibed\ or C:\vibed\ In Windows Console: D:\D\vibed> dub init Page7_Greetings -t vibe.d Successfully created an empty project in 'D:\vibed\Page7_Greetings D:\D\vibed> cd Page7_Greetings D:\D\vibed\Page7_Greetings> dub generate visuald Solution 'page7_greetings.sln' generated. Copying files for vibe-d:core... Open D:\D\vibed\Page7_Greetings\page7_greetings.sln in Visual Studio 2015 Community Edition. Change D:\D\vibed\page7_greetings\page7_greetings\source\app.d, line 15 from: res.writeBody("Hello, World!"); to: res.writeBody("Greetings, World!"); just to make a change and see that it takes. In Visual Studio run: Debug | Start Debugging (F5) Open Firefox browser to: localhost:8080 which displays: Greetings, World!
Mar 06 2016
parent reply Brother Bill <brotherbill mail.com> writes:
On Sunday, 6 March 2016 at 12:53:24 UTC, Brother Bill wrote:
 On Sunday, 6 March 2016 at 08:47:33 UTC, Rainer Schuetze wrote:
 On 06.03.2016 01:20, Brother Bill wrote:
 VisualD is up and running.
 I can build vibe.d outside of VisualD and it runs OK.

 What I can't do is build, debug and run Vibe.d within VisualD 
 inside
 Visual Studio 2015 Community Edition.

 I get this error when I attempt to build the initial Hello 
 World inside
 VisualD:
    Error: module d is in file 'vibe\d.d which cannot be read

 Please provide step by step instructions of how to create a 
 Visual
 Studio Solution/Project, add vibe.d to it, and run Hello 
 World within
 VisualD.
I'm not a user of vibe.d, but AFAICT the expected usage is to let dub generate the solution for you with "dub generate visuald". Even if you don't want to use the generated project, it will show you how to set the import path to find the vibe.d sources (which leads to the error above), add vibe.d version identifiers and library files for linking.
This is good. Success now. Here are the step by step instructions. I have all my vibed projects in D:\D\vibed\ which is my starting directory path. You should substitute your directory path, such as C:\D\vibed\ or C:\vibed\ In Windows Console: D:\D\vibed> dub init Page7_Greetings -t vibe.d Successfully created an empty project in 'D:\vibed\Page7_Greetings D:\D\vibed> cd Page7_Greetings D:\D\vibed\Page7_Greetings> dub generate visuald Solution 'page7_greetings.sln' generated. Copying files for vibe-d:core... Open D:\D\vibed\Page7_Greetings\page7_greetings.sln in Visual Studio 2015 Community Edition. Change D:\D\vibed\page7_greetings\page7_greetings\source\app.d, line 15 from: res.writeBody("Hello, World!"); to: res.writeBody("Greetings, World!"); just to make a change and see that it takes. In Visual Studio run: Debug | Start Debugging (F5) Open Firefox browser to: localhost:8080 which displays: Greetings, World!
When trying this in Visual Studio 2017, when building 5 same error messages appear. "Deprecation: alias diet.traits.FilterCallback is deprecated - Use SafeFilterCallback instead." Replacing static FilterCallback with static SafeFilterCallback just creates two different errors. Any ideas on how to build Hello, World! with vibe-d, VisualD and Visual Studio 2017? Thank you!
May 23 2017
parent evilrat <evilrat666 gmail.com> writes:
On Tuesday, 23 May 2017 at 10:06:24 UTC, Brother Bill wrote:
 When trying this in Visual Studio 2017, when building 5 same 
 error messages appear.
 "Deprecation: alias diet.traits.FilterCallback is deprecated - 
 Use SafeFilterCallback instead."

 Replacing static FilterCallback with static SafeFilterCallback 
 just creates two different errors.

 Any ideas on how to build Hello, World! with vibe-d, VisualD 
 and Visual Studio 2017?
 Thank you!
Despite it says "error" it is actually a warning, unless you build in release(it has stricter rules on warnings and other stuff) it should compiles just fine. And this message is for Vibe devs (you aren't using these functions in your project code anywhere, right?)
May 25 2017