Am 16.06.2015 um 20:58 schrieb David Dewitt:

Im trying to build a project with elasticsearch-d on OSX and am getting the following error:

 Target vibe-d 0.7.23 is up to date. Use --force to rebuild.
 Target elasticsearch-d 1.0.0-beta.1 is up to date. Use --force to rebuild.
 Building test2 ~master configuration "application", build type debug.
 Compiling using dmd...
 ../../../.dub/packages/vibe-d-0.7.23/source/vibe/appmain.d(28): Error: static assert  "Error: -version=VibeDefaultMain is required to use
 vibe.d's default main(). Or use -version=VibeCustomMain to use your own main() instead. Please update your build scripts."
 FAIL .dub/build/application-debug-posix.osx-x86_64-dmd_2066-1D851D3D1B64834FA9E35490630F23F6/ test2 executable
 Error executing command build: dmd failed with exit code 1.

I created a vibe project and it ran just fine. Note: this is my first time really trying to load a package in from DUB. I added

 	"dependencies": {
	"elasticsearch-d": "~>1.0.0-beta.1"
}

to dependencies and ran dub build. Im new to dub so not sure if I might have missed something.

Try adding "versions": ["VibeCustomMain"], if you want to define your
own main(), or "versions": ["VibeDefaultMain"] if you want to do
your initialization within shared static this and perform the rest of
the work within vibe.d tasks (runTask).

Things are currently still in a transitional phase. vibe.d started out
as something akin to a full framework environment such as Qt and the
static this approach was the default. Today it is intended to behave
more or less just like any other library where the default is to let the
library user define main(). One of the next releases will then switch
the default to VibeCustomMain and will remove the requirement to
explicitly define it.