www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - VibeCustomMain not working

reply Jerry <Kickupx gmail.com> writes:
Hello, I am trying to use vibe with DMD 2.67, dub and windows.
But in some way the default main function is sneaking in my build 
system even when I'm using VibeCustomMain version.

Main file:

import vibe.vibe;

void main() {
    writeln("Hello world");
}


And dub file:

{
     "targetType": "executable",
     "versions": [ "VibeCustomMain" ],
     "dependencies": {
	"luad": "~master",
	"kxml": "~>1.0.1",
	"jsonizer": "~>0.5.2",
	"vibe-d": "==0.7.23"
     }
}


I also tried this on DMD 2.71, 2.69 with same results. And I even 
tryed passing in VibeCustomMain manually.

Any ideas?
Apr 07 2016
parent reply Suliman <evermind live.ru> writes:
On Thursday, 7 April 2016 at 12:01:59 UTC, Jerry wrote:
 Hello, I am trying to use vibe with DMD 2.67, dub and windows.
 But in some way the default main function is sneaking in my 
 build system even when I'm using VibeCustomMain version.

 Main file:

 import vibe.vibe;

 void main() {
    writeln("Hello world");
 }


 And dub file:

 {
     "targetType": "executable",
     "versions": [ "VibeCustomMain" ],
     "dependencies": {
 	"luad": "~master",
 	"kxml": "~>1.0.1",
 	"jsonizer": "~>0.5.2",
 	"vibe-d": "==0.7.23"
     }
 }


 I also tried this on DMD 2.71, 2.69 with same results. And I 
 even tryed passing in VibeCustomMain manually.

 Any ideas?
You need to upgrade to the last dmd and vibed version. AFAIK the was issue old releases. than do: dup upgdare dub build Here is working code: dub.json: { "name": "App", "targetType": "executable", "versions": [ "VibeCustomMain" ], "dependencies": { "luad": "~master", "kxml": "~>1.0.1", "jsonizer": "~>0.5.2", "vibe-d": "==0.7.29" } } app.d: import vibe.vibe; import std.stdio; void main() { writeln("Edit source/app.d to start your project."); }
Apr 07 2016
parent reply Suliman <evermind live.ru> writes:
dup upgdare
dub upgdare
Apr 07 2016
parent reply Jerry <Kickupx gmail.com> writes:
On Thursday, 7 April 2016 at 13:13:14 UTC, Suliman wrote:
dup upgdare
dub upgdare
Tried that. I have to say this is odd.
Apr 07 2016
parent reply Jerry <Kickupx gmail.com> writes:
On Thursday, 7 April 2016 at 13:17:32 UTC, Jerry wrote:
 On Thursday, 7 April 2016 at 13:13:14 UTC, Suliman wrote:
dup upgdare
dub upgdare
Tried that. I have to say this is odd.
I generated a visuald project and tried that. Now suddenly it is working as expected. So I guess it's a bug in dub.
Apr 07 2016
parent reply Rene Zwanenburg <renezwanenburg gmail.com> writes:
On Thursday, 7 April 2016 at 13:25:29 UTC, Jerry wrote:
 I generated a visuald project and tried that. Now suddenly it 
 is working as expected. So I guess it's a bug in dub.
That's possible of course, but I'd expect something so fundamental breaking to be noticed sooner. Just to make sure, could you run dub with --force to rule out that it's picking up some stale object files from somewhere?
Apr 07 2016
next sibling parent Rene Zwanenburg <renezwanenburg gmail.com> writes:
On Thursday, 7 April 2016 at 13:40:17 UTC, Rene Zwanenburg wrote:
 That's possible of course, but I'd expect something so 
 fundamental breaking to be noticed sooner.

 Just to make sure, could you run dub with --force to rule out 
 that it's picking up some stale object files from somewhere?
And if that doesn't work, post the output of dub --force --verbose and we should be able to figure out where it goes wrong.
Apr 07 2016
prev sibling parent yawniek <dlang srtnwz.com> writes:
On Thursday, 7 April 2016 at 13:40:17 UTC, Rene Zwanenburg wrote:
 On Thursday, 7 April 2016 at 13:25:29 UTC, Jerry wrote:
 I generated a visuald project and tried that. Now suddenly it 
 is working as expected. So I guess it's a bug in dub.
That's possible of course, but I'd expect something so fundamental breaking to be noticed sooner. Just to make sure, could you run dub with --force to rule out that it's picking up some stale object files from somewhere?
i also had it multiple times that my build was broken and not even --force would fix it. then i deleted ~/.dub and .dub and rebuild everything and suddenly it worked.
Apr 07 2016