RejectedSoftware Forums

Sign up

Linker problem

Hi,
I'm having problems with linker.
Following the webchat tutorial in windows 8.1 powershell.
DMD32 D Compiler v2.082.0
DUB version 1.11.0, built on Sep 1 2018
run DBU in the webchat directory gives:
Unexpected OPTLINK termination at EIP=0040F60A

Is this a bug or am I doing something wrong?

vibe-d:redis 0.8.4: building configuration "library"...
vibe-d:web 0.8.4: building configuration "library"...
vibe-d 0.8.4: building configuration "vibe-core"...
webchat ~master: building configuration "application"...
Linking...
Error: linker exited with status 1
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
PS C:\Users\acpljn\Dprojects\webchat>

--- dub -v
C:\D\dmd2\windows\bin\dmd.exe -of.dub\build\application-debug-windows-x86-dmd2082-22D5F3E8EB3964F83EF9E2CAA7F0DFA9\webc<br>hat.exe .dub\build\application-debug-windows-x86-dmd2082-22D5F3E8EB3964F83EF9E2CAA7F0DFA9\webchat.obj ....\AppData\Loc
al\dub\packages\eventcore-0.8.35\eventcore\lib\ws232.lib ..\..\AppData\Local\dub\packages\eventcore-0.8.35\eventcore\li<br>b\kernel32.lib ..\..\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\lib\win-i386\eay.lib ..\..\AppData\Local\dub\package<br>s\vibe-d-0.8.4\vibe-d\lib\win-i386\ssl.lib ..\..\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\.dub\build\vibe-core-deb<br>ug-windows-x86-dmd2082-AC8E9C52E5DA4C718D0C4D60137DD509\vibed.lib ....\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\2082-A30A61CFC2C3B176245BB28194ECC70B\vibe-dmail.lib ....\AppData\Local\2082-45EFF06563E73D5C129C49AE6C79ABD0\<br>vibe-dmongodb.lib ....\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\redis.dub\build\library-debug-windows-x86-dmd2<br>082-8F32980DBE52C0FE354E97D2B8543722\vibe-dredis.lib ....\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\web.dub\buil
d\library-debug-windows-x86-dmd2082-56C11518BEAA0413BA579238F331C918\vibe-dweb.lib ....\AppData\Local\dub\packages\vi
be-d-0.8.4\vibe-d\http.dub\build\library-debug-windows-x86-dmd2082-1D5C8110FE4A023E466A429213BF53CB\vibe-dhttp.lib ..
..\AppData\Local\dub\packages\diet-ng-1.5.0\diet-ng.dub\build\library-debug-windows-x86-dmd2082-1E0B2E005C0BF1DA52689<br>A13D221EBA8\diet-ng.lib ..\..\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\crypto\.dub\build\library-debug-windows-x86<br>-dmd2082-E4D9571DE18593A565E5B02007B9DF4D\vibe-dcrypto.lib ..\..\AppData\Local\dub\packages\mir-linux-kernel-1.0.0\mir<br>-linux-kernel\.dub\build\library-debug-windows-x86-dmd2082-CEF3173AC5C1CE313352FFCA6CE776D7\mir-linux-kernel.lib ....\2082-2EF24D096122775F8F4FF9<br>4A66952FD9\vibe-dinet.lib ....\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\textfilter.dub\build\library-debug-wind
ows-x86-dmd2082-D6C362735782AD415DF49C64C26B5232\vibe-dtextfilter.lib ....\AppData\Local\dub\packages\vibe-d-0.8.4\vi
be-d\tls.dub\build\openssl-debug-windows-x86-dmd2082-C21E9E3D6109A093A108AF3587AC3B99\vibe-dtls.lib ....\AppData\Loc
al\dub\packages\vibe-d-0.8.4\vibe-d\stream.dub\build\library-debug-windows-x86-dmd2082-BEFC38A960D14105B274F6A006A65BF<br>6\vibe-dstream.lib ....\AppData\Local\dub\packages\vibe-core-1.4.3\vibe-core.dub\build\winapi-optlink-debug-windows-x
86-dmd2082-F6931C0BB88303FE992B4E30F16242D8\vibecore.lib ....\AppData\Local\dub\packages\eventcore-0.8.35\eventcore.
dub\build\winapi-optlink-debug-windows-x86-dmd2082-C633A3F5B0318B1E1EF5DB9D412E7A2B\eventcore.lib ..\..\AppData\Local\d<br>ub\packages\taggedalgebraic-0.10.11\taggedalgebraic\.dub\build\library-debug-windows-x86-dmd2082-3D04C3231C664E4981B62C
096AB96543\taggedalgebraic.lib ....\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\data.dub\build\library-debug-window
s-x86-dmd2082-C56AA3ED3D4DBE043F983BCF112D3884\vibe-ddata.lib ....\AppData\Local\dub\packages\vibe-d-0.8.4\vibe-d\uti
ls.dub\build\library-debug-windows-x86-dmd2082-F78BCEB22792AE0F20755203723B35B7\vibe-dutils.lib ....\AppData\Local\d
ub\packages\stdx-allocator-2.77.2\stdx-allocator.dub\build\library-debug-windows-x86-dmd2082-3F021A333A12182BD07954215<br>A49D3AF\stdx-allocator.lib ws232.lib user32.lib advapi32.lib -g
Error: linker exited with status 1
FAIL .dub\build\application-debug-windows-x86-dmd_2082-22D5F3E8EB3964F83EF9E2CAA7F0DFA9\ webchat executable
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
PS C:\Users\ACPljn\Dprojects\webchat>

Re: Linker problem

On Fri, 14 Sep 2018 06:42:00 GMT, Lars Johansson wrote:

Hi,
I'm having problems with linker.
Following the webchat tutorial in windows 8.1 powershell.
DMD32 D Compiler v2.082.0
DUB version 1.11.0, built on Sep 1 2018
run DBU in the webchat directory gives:
Unexpected OPTLINK termination at EIP=0040F60A

Is this a bug or am I doing something wrong?

(...)

This is currently an unfortunate limitation on Windows, where the DigitalMars linker runs into a crash when building with the default OMF output. The alternative is to build using either -a x86_mscoff or -a x86_64. I haven't tested it, but the latter may run out of the box, while the former probably requires VisualStudio to be installed, so that the Microsoft linker is available.

The other alternative is to use LDC instead of DMD, which also runs fine on Windows (dub --compiler=path/to/ldc2.exe).