VibeCustomMain not working

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 7 06:10:18 PDT 2016


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.");
}





More information about the Digitalmars-d-learn mailing list