On Fri, 14 Feb 2014 17:15:20 GMT, Matthew Fong wrote:

On Fri, 14 Feb 2014 17:59:44 +0100, Sönke Ludwig wrote:

-snip-
"versions": ["VibeWin32Driver"] should actually work (just tested
successfully on a local project). Do you build on the command line or
within VisualStudio? In the latter case, did you regenerate the project
file?

Hmmm... then there must be something wrong with my setup. I'm building with mono-d, but these tests are done on command line. It shouldnt matter anyways I guess. Maybe my package.json? I haven't yet fully grasped the format.

C:\test_flash\project>cat package.json
{
        "name": "packetexport",
        "description": "A minimal D application.",
        "copyright": "Copyright © 2014, Unknown",
        "authors": ["Unknown"],
        "dependencies": {
                "vibe-d": "~master"
        },
        "excludedSourceFiles" : ["source/lzma.d"],
        "versions": ["VibeWin32Driver", "VibeDefaultMain"]
}

C:\test_flash\project>dub --arch=x86_64
Got application for true
Checking dependencies in 'C:\test_flash\project'
Copying files...
Failed to copy to C:\test_flash\project\libevent.dll
Building configuration "application", build type debug
Compiling...
source\autodata.d(46): Warning: toHash() must be declared as extern (D) size_t toHash() const nothrow @safe, not const ulong()
Linking...
LINK : fatal error LNK1104: Datei "..\..\Users\Unknown\AppData\Roaming\dub\packages\vibe-d-master\lib\win-amd64\event2.lib" kann nicht geöffnet werden.
--- errorlevel 1104
Error executing command run: Link command failed with exit code 1104


C:\test_flash\project>

I did a few more tests. Here are my findings:
dub does correctly set the -version=VibeWin32Driver flag for dmd and -m64, so that should be fine.
when it comes to the linking stage though, it still instructs the compiler to link in the non-existen libevent file.
So I wondered why that would be the case and indeed I found it also passes -version=VibeLibeventDriver to dmd. So somehow it must think I specified that too. (which I didn't - at least not in my local package.json).
Is there any other files that dub checks for for these version specifiers? Some files that I might have changed (I can't remember doing so, but I dont want to rule out the possibility)?
Here is my complete dub output on pastebin (since its too long otherwise):
http://pastebin.com/uiUU3BPd

I hope that helps diagnosing the problem