Re: "Start a Minimal web server" example do not work.

2018-05-09 Thread Rainer Schuetze via Digitalmars-d-learn



On 08/05/2018 21:36, BoQsc wrote:

On Tuesday, 8 May 2018 at 19:19:26 UTC, Seb wrote:

On Tuesday, 8 May 2018 at 18:40:34 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote:

[...]


Tested with these versions so far, and had all the same errors:
C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.079.1

C:\Users\Vaidas>dub --version
DUB version 1.8.1, built on Apr 14 2018

C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.080.0

C:\Users\Vaidas>dub --version
DUB version 1.9.0, built on May  1 2018


Linking...
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_106c_952.obj): undefined symbol: SetWindowLongPtrA
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_106c_952.obj): undefined symbol: GetWindowLongPtrA

error: link failed
Error: linker exited with status 1
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.


Unfortunately, the MinGW version that the replacement libraries are 
built from omit this symbol. Please file a bug report.


For Win32 (--arch=x86_mscoff) this symbol is aliased to SetWindowLongA 
which should be fine.




That's with DMD's bundled LLD linker.
Have you tried:

1) installing MS Visual Studio (as others have mentioned their linker 
works)

2) Using LDC (they usually ship a newer version of the LLD linker)


I have installed the one suggested by the dmd-2.080.0.exe installer:

Microsoft Visual Studio Community 2017
Version 15.7.0
VisualStudio.15.Release/15.7.0+27703.1
Microsoft .NET Framework
Version 4.7.02556


What you actually need is Visual C++ (linker and runtime libraries). For 
the missing symbol above you also need the Windows SDK which is usually 
included in the Visual C++ installation.


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 19:19:26 UTC, Seb wrote:

On Tuesday, 8 May 2018 at 18:40:34 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote:

[...]


Tested with these versions so far, and had all the same 
errors:

C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.079.1

C:\Users\Vaidas>dub --version
DUB version 1.8.1, built on Apr 14 2018

C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.080.0

C:\Users\Vaidas>dub --version
DUB version 1.9.0, built on May  1 2018


Linking...
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_106c_952.obj): undefined symbol: 
SetWindowLongPtrA
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_106c_952.obj): undefined symbol: 
GetWindowLongPtrA

error: link failed
Error: linker exited with status 1
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.


That's with DMD's bundled LLD linker.
Have you tried:

1) installing MS Visual Studio (as others have mentioned their 
linker works)
2) Using LDC (they usually ship a newer version of the LLD 
linker)


I have installed the one suggested by the dmd-2.080.0.exe 
installer:


Microsoft Visual Studio Community 2017
Version 15.7.0
VisualStudio.15.Release/15.7.0+27703.1
Microsoft .NET Framework
Version 4.7.02556

Installed Version: Community

Mago Native Debug Engine   1.0.0
A debug engine dedicated to debugging applications written in the 
D programming language. See the project website at 
http://www.dsource.org/projects/mago_debugger for more 
information. Copyright (c) 2010-2014 Aldo J. Nunez


ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Visual D   0.46.0
Integration of the D Programming Language into Visual Studio


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread Seb via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 18:40:34 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote:

[...]


Tested with these versions so far, and had all the same errors:
C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.079.1

C:\Users\Vaidas>dub --version
DUB version 1.8.1, built on Apr 14 2018

C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.080.0

C:\Users\Vaidas>dub --version
DUB version 1.9.0, built on May  1 2018


Linking...
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_106c_952.obj): undefined symbol: 
SetWindowLongPtrA
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_106c_952.obj): undefined symbol: 
GetWindowLongPtrA

error: link failed
Error: linker exited with status 1
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.


That's with DMD's bundled LLD linker.
Have you tried:

1) installing MS Visual Studio (as others have mentioned their 
linker works)

2) Using LDC (they usually ship a newer version of the LLD linker)


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote:

On Tuesday, 8 May 2018 at 16:34:53 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 16:18:27 UTC, bachmeier wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:


This is the code example, that was presented on the 
https://dlang.org frontpage:


Maybe that isn't the best choice of beginner example if even 
the D experts can't figure out how to get it to run.


Might be a bug, I have already reported it and saw some bug 
duplicates like mine.
However, since 2017 report, it seems to be - still not going 
well.
If I have a chance I'll try to download latest dlang 
distribution and install on a completely clean Windows 10 
Operating system. But I'm not hoping for any luck, but still 
in need of try trial.


So I gave this a try and this command worked:

 >dub --arch=x86_64 --single start_minimal_server.d

I'm on Windows 8 with All the visual studio versions installed
DMD32 D Compiler v2.080.0-beta.1
DUB version 1.9.0-beta.1, built on Apr 17 2018


Tested with these versions so far, and had all the same errors:
C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.079.1

C:\Users\Vaidas>dub --version
DUB version 1.8.1, built on Apr 14 2018

C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.080.0

C:\Users\Vaidas>dub --version
DUB version 1.9.0, built on May  1 2018


Linking...
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_106c_952.obj): undefined symbol: 
SetWindowLongPtrA
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_106c_952.obj): undefined symbol: 
GetWindowLongPtrA

error: link failed
Error: linker exited with status 1
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote:

On Tuesday, 8 May 2018 at 16:34:53 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 16:18:27 UTC, bachmeier wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:


This is the code example, that was presented on the 
https://dlang.org frontpage:


Maybe that isn't the best choice of beginner example if even 
the D experts can't figure out how to get it to run.


Might be a bug, I have already reported it and saw some bug 
duplicates like mine.
However, since 2017 report, it seems to be - still not going 
well.
If I have a chance I'll try to download latest dlang 
distribution and install on a completely clean Windows 10 
Operating system. But I'm not hoping for any luck, but still 
in need of try trial.


So I gave this a try and this command worked:

 >dub --arch=x86_64 --single start_minimal_server.d

I'm on Windows 8 with All the visual studio versions installed
DMD32 D Compiler v2.080.0-beta.1
DUB version 1.9.0-beta.1, built on Apr 17 2018


Tested with these versions so far, and had all the same errors:
C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.079.1

C:\Users\Vaidas>dub --version
DUB version 1.8.1, built on Apr 14 2018

C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.080.0

C:\Users\Vaidas>dub --version
DUB version 1.9.0, built on May  1 2018


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread Jesse Phillips via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote:

Tested with these versions so far, and had all the same errors:
C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.079.1

C:\Users\Vaidas>dub --version
DUB version 1.8.1, built on Apr 14 2018

C:\Users\Vaidas>dmd --version
DMD32 D Compiler v2.080.0

C:\Users\Vaidas>dub --version
DUB version 1.9.0, built on May  1 2018


Well I'm pretty sure the primary reason for my success is having 
Visual Studio installed and using the ms linker.


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread Jesse Phillips via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 16:34:53 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 16:18:27 UTC, bachmeier wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:


This is the code example, that was presented on the 
https://dlang.org frontpage:


Maybe that isn't the best choice of beginner example if even 
the D experts can't figure out how to get it to run.


Might be a bug, I have already reported it and saw some bug 
duplicates like mine.
However, since 2017 report, it seems to be - still not going 
well.
If I have a chance I'll try to download latest dlang 
distribution and install on a completely clean Windows 10 
Operating system. But I'm not hoping for any luck, but still in 
need of try trial.


So I gave this a try and this command worked:

 >dub --arch=x86_64 --single start_minimal_server.d

I'm on Windows 8 with All the visual studio versions installed
DMD32 D Compiler v2.080.0-beta.1
DUB version 1.9.0-beta.1, built on Apr 17 2018


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread Andre Pany via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 13:33:51 UTC, drug wrote:

08.05.2018 16:23, BoQsc пишет:

On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote:

On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:

[...]


This one needs to be compiled+run with the dub package 
manager instead of with rdmd, which is why it has that 
shebang line. It has external library dependencies rdmd 
can't handle.


My intuition now says to use dub this way:
--
C:\Users\Vaidas\Desktop>dub start_minimum_server.d
EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

And got an error: Unexpected OPTLINK Termination at 
EIP=0040F60A

EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D
ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0
First=00402000

Similar to this one: 
https://issues.dlang.org/show_bug.cgi?id=18799


Did you try the newer MSCOFF format

dub --arch=x86_mscoff start_minimum_server.d

or

dub --arch=x64 start_minimum_server.d


C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff 
start_minimum_server.d

Failed to find a package named 'start_minimum_server.d'.

C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d
Unsupported architecture: x64


didn't you forget `--single` option?
```
dub --arch=x64 --single start_minimum_server.d
```


--single is not needed because dub will add it automatically for 
you.


It seems like an optlink bug. Switching to mscoff32/x64 works, 
but only if you have in addition Microsoft Build Tools or s.th. 
similar installed.


Therefore dmd ships now with the llvm linker but I am not sure 
how mature this is.


Kind regards
Andre


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 16:18:27 UTC, bachmeier wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:


This is the code example, that was presented on the 
https://dlang.org frontpage:


Maybe that isn't the best choice of beginner example if even 
the D experts can't figure out how to get it to run.


Might be a bug, I have already reported it and saw some bug 
duplicates like mine.

However, since 2017 report, it seems to be - still not going well.
If I have a chance I'll try to download latest dlang distribution 
and install on a completely clean Windows 10 Operating system. 
But I'm not hoping for any luck, but still in need of try trial.


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 16:02:02 UTC, rjframe wrote:

On Tue, 08 May 2018 13:23:07 +, BoQsc wrote:


On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote:


Did you try the newer MSCOFF format

dub --arch=x86_mscoff start_minimum_server.d

or

dub --arch=x64 start_minimum_server.d


C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff 
start_minimum_server.d Failed to find a package named 
'start_minimum_server.d'.


C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d 
Unsupported architecture: x64


Try the 64-bit build as "--arch=x86_64"; dub doesn't recognize 
x64 (at least on Windows).


dub --arch=x86_64 --single start_minimum_server.d

For your first attempt above, adding the --single flag might 
work.



--Ryan


C:\Users\Vaidas\Desktop>dub --arch=x86_64 --single 
start_minimum_server.d
Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for 
x86_64.

taggedalgebraic 0.10.11: building configuration "library"...
eventcore 0.8.34: building configuration "winapi"...
stdx-allocator 2.77.1: building configuration "library"...
vibe-core 1.4.0: building configuration "winapi"...
vibe-d:utils 0.8.3: building configuration "library"...
vibe-d:data 0.8.3: building configuration "library"...
vibe-d:crypto 0.8.3: building configuration "library"...
diet-ng 1.4.5: building configuration "library"...
vibe-d:stream 0.8.3: building configuration "library"...
vibe-d:textfilter 0.8.3: building configuration "library"...
vibe-d:inet 0.8.3: building configuration "library"...
vibe-d:tls 0.8.3: building configuration "openssl-mscoff"...
vibe-d:http 0.8.3: building configuration "library"...
vibe-d:mail 0.8.3: building configuration "library"...
vibe-d:mongodb 0.8.3: building configuration "library"...
vibe-d:redis 0.8.3: building configuration "library"...
vibe-d:web 0.8.3: building configuration "library"...
vibe-d 0.8.3: building configuration "vibe-core"...
hello_vibed ~master: building configuration "application"...
Linking...
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_1034_952.obj): undefined symbol: 
SetWindowLongPtrA
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
eventcore.lib(sockets_1034_952.obj): undefined symbol: 
GetWindowLongPtrA

error: link failed
Error: linker exited with status 1
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

C:\Users\Vaidas\Desktop>


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread bachmeier via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:


This is the code example, that was presented on the 
https://dlang.org frontpage:


Maybe that isn't the best choice of beginner example if even the 
D experts can't figure out how to get it to run.


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread rjframe via Digitalmars-d-learn
On Tue, 08 May 2018 13:23:07 +, BoQsc wrote:

> On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote:
>>
>> Did you try the newer MSCOFF format
>>
>> dub --arch=x86_mscoff start_minimum_server.d
>>
>> or
>>
>> dub --arch=x64 start_minimum_server.d
> 
> C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff start_minimum_server.d
> Failed to find a package named 'start_minimum_server.d'.
> 
> C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d
> Unsupported architecture: x64

Try the 64-bit build as "--arch=x86_64"; dub doesn't recognize x64 (at 
least on Windows).

dub --arch=x86_64 --single start_minimum_server.d

For your first attempt above, adding the --single flag might work.


--Ryan


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 13:33:51 UTC, drug wrote:

08.05.2018 16:23, BoQsc пишет:

On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote:

On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:

[...]


This one needs to be compiled+run with the dub package 
manager instead of with rdmd, which is why it has that 
shebang line. It has external library dependencies rdmd 
can't handle.


My intuition now says to use dub this way:
--
C:\Users\Vaidas\Desktop>dub start_minimum_server.d
EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

And got an error: Unexpected OPTLINK Termination at 
EIP=0040F60A

EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D
ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0
First=00402000

Similar to this one: 
https://issues.dlang.org/show_bug.cgi?id=18799


Did you try the newer MSCOFF format

dub --arch=x86_mscoff start_minimum_server.d

or

dub --arch=x64 start_minimum_server.d


C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff 
start_minimum_server.d

Failed to find a package named 'start_minimum_server.d'.

C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d
Unsupported architecture: x64


didn't you forget `--single` option?
```
dub --arch=x64 --single start_minimum_server.d
```


C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff --single 
start_minimum_server.d
Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for 
x86, x86_mscoff.

taggedalgebraic 0.10.11: building configuration "library"...
eventcore 0.8.34: building configuration "winapi"...
stdx-allocator 2.77.1: building configuration "library"...
vibe-core 1.4.0: building configuration "winapi"...
vibe-d:utils 0.8.3: building configuration "library"...
vibe-d:data 0.8.3: building configuration "library"...
vibe-d:crypto 0.8.3: building configuration "library"...
diet-ng 1.4.5: building configuration "library"...
vibe-d:stream 0.8.3: building configuration "library"...
vibe-d:textfilter 0.8.3: building configuration "library"...
vibe-d:inet 0.8.3: building configuration "library"...
vibe-d:tls 0.8.3: building configuration "openssl-mscoff"...
vibe-d:http 0.8.3: building configuration "library"...
vibe-d:mail 0.8.3: building configuration "library"...
vibe-d:mongodb 0.8.3: building configuration "library"...
vibe-d:redis 0.8.3: building configuration "library"...
vibe-d:web 0.8.3: building configuration "library"...
vibe-d 0.8.3: building configuration "vibe-core"...
hello_vibed ~master: building configuration "application"...
Linking...
C:\D\dmd2\windows\bin\lld-link.exe: warning: 
phobos32mscoff.lib(crc32.obj): undefined symbol: __allshr

error: link failed
Error: linker exited with status 1
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

C:\Users\Vaidas\Desktop>



Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread drug via Digitalmars-d-learn

08.05.2018 16:23, BoQsc пишет:

On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote:

On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:

[...]


This one needs to be compiled+run with the dub package manager 
instead of with rdmd, which is why it has that shebang line. It has 
external library dependencies rdmd can't handle.


My intuition now says to use dub this way:
--
C:\Users\Vaidas\Desktop>dub start_minimum_server.d
EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

And got an error: Unexpected OPTLINK Termination at EIP=0040F60A
EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D
ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0
First=00402000

Similar to this one: https://issues.dlang.org/show_bug.cgi?id=18799


Did you try the newer MSCOFF format

dub --arch=x86_mscoff start_minimum_server.d

or

dub --arch=x64 start_minimum_server.d


C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff start_minimum_server.d
Failed to find a package named 'start_minimum_server.d'.

C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d
Unsupported architecture: x64


didn't you forget `--single` option?
```
dub --arch=x64 --single start_minimum_server.d
```


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote:

On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:

[...]


This one needs to be compiled+run with the dub package 
manager instead of with rdmd, which is why it has that 
shebang line. It has external library dependencies rdmd can't 
handle.


My intuition now says to use dub this way:
--
C:\Users\Vaidas\Desktop>dub start_minimum_server.d
EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

And got an error: Unexpected OPTLINK Termination at 
EIP=0040F60A

EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D
ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0
First=00402000

Similar to this one: 
https://issues.dlang.org/show_bug.cgi?id=18799


Did you try the newer MSCOFF format

dub --arch=x86_mscoff start_minimum_server.d

or

dub --arch=x64 start_minimum_server.d


C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff 
start_minimum_server.d

Failed to find a package named 'start_minimum_server.d'.

C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d
Unsupported architecture: x64


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread Seb via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote:

On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:

[...]


This one needs to be compiled+run with the dub package manager 
instead of with rdmd, which is why it has that shebang line. 
It has external library dependencies rdmd can't handle.


My intuition now says to use dub this way:
--
C:\Users\Vaidas\Desktop>dub start_minimum_server.d
EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

And got an error: Unexpected OPTLINK Termination at EIP=0040F60A
EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D
ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0
First=00402000

Similar to this one: 
https://issues.dlang.org/show_bug.cgi?id=18799


Did you try the newer MSCOFF format

dub --arch=x86_mscoff start_minimum_server.d

or

dub --arch=x64 start_minimum_server.d


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote:

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:
This is the code example, that was presented on the 
https://dlang.org frontpage:


-
#!/usr/bin/env dub


This one needs to be compiled+run with the dub package manager 
instead of with rdmd, which is why it has that shebang line. It 
has external library dependencies rdmd can't handle.


My intuition now says to use dub this way:
--
C:\Users\Vaidas\Desktop>dub start_minimum_server.d
EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

And got an error: Unexpected OPTLINK Termination at EIP=0040F60A
EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D
ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0
First=00402000

Similar to this one: 
https://issues.dlang.org/show_bug.cgi?id=18799


Re: "Start a Minimal web server" example do not work.

2018-05-08 Thread Adam D. Ruppe via Digitalmars-d-learn

On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote:
This is the code example, that was presented on the 
https://dlang.org frontpage:


-
#!/usr/bin/env dub


This one needs to be compiled+run with the dub package manager 
instead of with rdmd, which is why it has that shebang line. It 
has external library dependencies rdmd can't handle.


"Start a Minimal web server" example do not work.

2018-05-08 Thread BoQsc via Digitalmars-d-learn


This is the code example, that was presented on the 
https://dlang.org frontpage:


-
#!/usr/bin/env dub
/+ dub.sdl:
name "hello_vibed"
dependency "vibe-d" version="~>0.8.0"
+/
void main()
{
import vibe.d;
listenHTTP(":8080", (req, res) {
res.writeBody("Hello, World: " ~ req.path);
});
runApplication();
}
-

I have copied this example code into start_minimum_server.d file.
Ran it as script with rdmd.exe

And got an output:
--

C:\Users\Vaidas\Desktop>rdmd start_minimum_server.d
start_minimum_server.d(8): Error: module `d` is in file 
'vibe\d.d' which cannot be read

import path[0] = .
import path[1] = C:\D\dmd2\windows\bin\..\..\src\phobos
import path[2] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
Failed: ["dmd", "-v", "-o-", "start_minimum_server.d", "-I."]
--