Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty project doesn't compile #13

Closed
sigod opened this issue Feb 22, 2013 · 3 comments
Closed

Empty project doesn't compile #13

sigod opened this issue Feb 22, 2013 · 3 comments

Comments

@sigod
Copy link

sigod commented Feb 22, 2013

import std.stdio;

void main()
{ 
    writeln("Edit source/app.d to start your project.");
}

dub build produces following error:

.dub\packages\vibe-d\source\vibe\appmain.d(36): Error: only one main/WinMain/DllMain allowed
Error: Build command failed with exit code 1

May be better to replace this code with Hello World example?

@s-ludwig
Copy link
Member

The problem here is that the package.json file of that project contains a dependency to vibe.d and defines its own main(). For that to work, it is currently required to add "versions": ["VibeCustomMain"] to package.json. This is a bit unfortunate and just to support the pure static this based initialization as in most vibe.d examples.

But the vanilla package.json should not contain a vibe.d dependency after dub init - did you add one manually?

But anyway, the situation with the VibeCustomMain version needs improvement, not sure how exactly, tough...

@sigod
Copy link
Author

sigod commented Feb 22, 2013

did you add one manually?

Yes. Sorry, I forget to mention this.

@mdondorff
Copy link
Contributor

Closing this issue, as the remaining problem is a package specific problem. Although people are highly encouraged in using vibe, dub should not provide a special solution for it. But a generalization of this problem seems to me a bit to rare, as few libraries will define it's own main().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants