Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
April 07, 2016 VibeCustomMain not working | ||||
---|---|---|---|---|
| ||||
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? |
April 07, 2016 Re: VibeCustomMain not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jerry | 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.");
}
|
April 07, 2016 Re: VibeCustomMain not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | >dup upgdare
dub upgdare
|
April 07, 2016 Re: VibeCustomMain not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | 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.
|
April 07, 2016 Re: VibeCustomMain not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jerry | 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.
|
April 07, 2016 Re: VibeCustomMain not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jerry | 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?
|
April 07, 2016 Re: VibeCustomMain not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rene Zwanenburg | 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.
|
April 07, 2016 Re: VibeCustomMain not working | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rene Zwanenburg | 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.
|
Copyright © 1999-2021 by the D Language Foundation