RejectedSoftware Forums

Sign up

building a simple app with vibe.d on windows for x86_64

Hi,

I'm trying to migrate our application to Windows 64 bits, since I had a lot of problems when linking the application I tried a simple app (using dub init -t vibe.d) to see if it was some missing dependency or configuration in my dub files, but unfortunately link errors show up too.

Next my configuration:

dmd -v
DMD32 D Compiler v2.066.1
dub --version
DUB version 0.9.23-rc.1, built on Mar 25 2015

After executing dub init, I modified the dub.json to use vibe-d with the win32 configuration:

{
        "name": "vibe-test",
        "description": "A simple vibe.d server application.",
        "copyright": "Copyright © 2015, rgaitan",
        "authors": ["rgaitan"],
        "dependencies": {
                "vibe-d": "~>0.7.19"
        },
        "versions": ["VibeDefaultMain"],
        "subConfigurations": { "vibe-d": "win32" }
}

Building it with:

dub build --arch=x86_64 --build=release

Building vibe-d 0.7.23 configuration "win32", build type release.
Running dmd...
Building vibe-test ~master configuration "application", build type release.
Compiling using dmd...
Linking...
vibe-d.lib(openssl_2499_763.obj) : error LNK2001: símbolo externo _D4core6thread6Thread7getThisFZC4core6thread6Thread sin resolver
vibe-d.lib(core.obj) : error LNK2001: símbolo externo _D4core6thread6Thread7getThisFZC4core6thread6Thread sin resolver
vibe-d.lib(core_1b45_4f1.obj) : error LNK2001: símbolo externo _D4core6thread6Thread7getThisFZC4core6thread6Thread sin resolver
vibe-d.lib(log_1c8f_26c.obj) : error LNK2001: símbolo externo _D4core6thread6Thread7getThisFZC4core6thread6Thread sin resolver
vibe-d.lib(task_1f16_37b.obj) : error LNK2001: símbolo externo _D4core6thread6Thread7getThisFZC4core6thread6Thread sin resolver
vibe-d.lib(core_1b5a_57b.obj) : error LNK2019: símbolo externo _D4core6thread5Fiber4callMFbZC6Object sin resolver al que se hace referencia en la función _D4vi
TaskC9ExceptionZv
.dub\build\application-release-windows-x86_64-dmd_2066-AEC467B3F700223253C5F9F45724FAE1\vibe-test.exe : fatal error LNK1120: 2 externos sin resolver
--- errorlevel 1120
FAIL .dub\build\application-release-windows-x86_64-dmd_2066-AEC467B3F700223253C5F9F45724FAE1\ vibe-test executable
Error executing command build:
dmd failed with exit code 1120.

Error messages are in spanish :), but basically says that there are missing symbols.

Am I missing something?

Thank you!

PS. I just upgraded dub today because with the previous version I had the same problems.

Re: building a simple app with vibe.d on windows for x86_64

I couldn't reproduce this locally, either with DMD 2.066.1 or with
2.067.0. Maybe there is something odd with the intermediate build files.
Did you try to perform a fresh build using dub build --force.

To test, I was using the http_server example, modified to use the
"win32" configuration. DUB was run from the VisualStudio 2013 x64
command prompt.

Re: building a simple app with vibe.d on windows for x86_64

Hi!

Thanks for the answer.

On Thu, 26 Mar 2015 23:13:59 +0100, Sönke Ludwig wrote:

I couldn't reproduce this locally, either with DMD 2.066.1 or with
2.067.0. Maybe there is something odd with the intermediate build files.
Did you try to perform a fresh build using dub build --force.

Yes I tried that too, and same error.

To test, I was using the http_server example, modified to use the
"win32" configuration. DUB was run from the VisualStudio 2013 x64
command prompt.

I also tried the http_server example with a VisualStudio 2013 console and I'm getting similar link errors.

I'll try in another windows just in case something is confusing the linker, but if someone else has any idea it would be great! :)

Rafa.