Jump to page: 1 2
Thread overview
I can't Hello World!
Mar 04, 2017
Better World
Mar 04, 2017
Rainer Schuetze
Mar 05, 2017
Better World
Mar 05, 2017
Rainer Schuetze
Mar 07, 2017
Better World
Mar 10, 2017
Rainer Schuetze
Mar 09, 2017
Jupiter
Mar 10, 2017
Rainer Schuetze
Mar 16, 2017
Jupiter
Mar 17, 2017
Kagamin
Mar 18, 2017
Vladimir Panteleev
Mar 20, 2017
Kagamin
March 04, 2017
So this is my first few hours doing D. I installed DMD and VisualD on VS 2015. Doing the tour in https://tour.dlang.org/, the programs build fine but no print statements come out in the output pane. That's what comes out instead:

C:\Windows\SysWOW64\kernel32.dll unloaded.
C:\Windows\SysWOW64\ucrtbase.dll unloaded.
C:\Windows\SysWOW64\dbghelp.dll unloaded.
The thread 0x38d0 has exited with code 0 (0x0).
The thread 0x3668 has exited with code 0 (0x0).
The thread 0x3510 has exited with code 0 (0x0).
The program '[14112] SeriousD.exe' has exited with code 0 (0x0).

What can I do?

March 04, 2017

On 04.03.2017 07:14, Better World wrote:
> So this is my first few hours doing D. I installed DMD and VisualD on VS
> 2015. Doing the tour in https://tour.dlang.org/, the programs build fine
> but no print statements come out in the output pane. That's what comes
> out instead:
>
> C:\Windows\SysWOW64\kernel32.dll unloaded.
> C:\Windows\SysWOW64\ucrtbase.dll unloaded.
> C:\Windows\SysWOW64\dbghelp.dll unloaded.
> The thread 0x38d0 has exited with code 0 (0x0).
> The thread 0x3668 has exited with code 0 (0x0).
> The thread 0x3510 has exited with code 0 (0x0).
> The program '[14112] SeriousD.exe' has exited with code 0 (0x0).
>
> What can I do?
>

The output pane only shows messages from the debugger. The program output is displayed in a console window which you probably see flashing.

If you press Ctrl+F5, the program is run without debugger, but won't close the console window unless you press a key.
March 05, 2017
On Saturday, 4 March 2017 at 07:58:45 UTC, Rainer Schuetze wrote:
> If you press Ctrl+F5, the program is run without debugger, but won't close the console window unless you press a key.

Thank you.
I tried your advice but I see no console either way. I inserted a Thread.sleep() call and apparently it delays the program termination but doesn't allow me to see the console still. Inserting a call to readln() instead results in a bad descriptor exception.
March 05, 2017

On 05.03.2017 01:44, Better World wrote:
> On Saturday, 4 March 2017 at 07:58:45 UTC, Rainer Schuetze wrote:
>> If you press Ctrl+F5, the program is run without debugger, but won't
>> close the console window unless you press a key.
>
> Thank you.
> I tried your advice but I see no console either way. I inserted a
> Thread.sleep() call and apparently it delays the program termination but
> doesn't allow me to see the console still. Inserting a call to readln()
> instead results in a bad descriptor exception.

I suspect you started from a Windows Application template. You should then switch the "Subsystem" to "Console" (on the "General" page of the project configuration settings).
March 07, 2017
On Sunday, 5 March 2017 at 19:57:56 UTC, Rainer Schuetze wrote:
>
> I suspect you started from a Windows Application template. You should then switch the "Subsystem" to "Console" (on the "General" page of the project configuration settings).

Thank you. that worked. I appreciate a little explanation of why it didn't work and now works.
March 09, 2017
On Sunday, 5 March 2017 at 19:57:56 UTC, Rainer Schuetze wrote:
>
>
> On 05.03.2017 01:44, Better World wrote:
>> On Saturday, 4 March 2017 at 07:58:45 UTC, Rainer Schuetze wrote:
>>> If you press Ctrl+F5, the program is run without debugger, but won't
>>> close the console window unless you press a key.
>>
>> Thank you.
>> I tried your advice but I see no console either way. I inserted a
>> Thread.sleep() call and apparently it delays the program termination but
>> doesn't allow me to see the console still. Inserting a call to readln()
>> instead results in a bad descriptor exception.
>
> I suspect you started from a Windows Application template. You should then switch the "Subsystem" to "Console" (on the "General" page of the project configuration settings).


Hi,
    I started Today with D and VS too,
     A quesiton please,
 When I compile with dmd in console I get a *.exe in my current directory.
 But when I compile with rdmd the exe is far away
in User Local temp and with a long name, the same stuff with Visual Studio plugin.
I am studying, no project yet, I want File alone compilation.
  Could I set the directory Output for rdmd as dmd is doing, in the current directory ?
 VS plugin is using rdmd, I believe.
  Perhaps,.. Could I  switch to dmd in VS 2013?

Greeting
 thanks.
(sorry my english)

March 10, 2017

On 07.03.2017 02:25, Better World wrote:
> On Sunday, 5 March 2017 at 19:57:56 UTC, Rainer Schuetze wrote:
>>
>> I suspect you started from a Windows Application template. You should
>> then switch the "Subsystem" to "Console" (on the "General" page of the
>> project configuration settings).
>
> Thank you. that worked. I appreciate a little explanation of why it
> didn't work and now works.

With subsystem "Windows", you tell the OS that your application will have a graphic UI with the usual windows. The OS will not create the console window in that case and the appropriate file handles will be invalid. Switching to subsystem "Console" will restore that behavior.
March 10, 2017

On 09.03.2017 02:32, Jupiter wrote:
> On Sunday, 5 March 2017 at 19:57:56 UTC, Rainer Schuetze wrote:
>>
>>
>> On 05.03.2017 01:44, Better World wrote:
>>> On Saturday, 4 March 2017 at 07:58:45 UTC, Rainer Schuetze wrote:
>>>> If you press Ctrl+F5, the program is run without debugger, but won't
>>>> close the console window unless you press a key.
>>>
>>> Thank you.
>>> I tried your advice but I see no console either way. I inserted a
>>> Thread.sleep() call and apparently it delays the program termination but
>>> doesn't allow me to see the console still. Inserting a call to readln()
>>> instead results in a bad descriptor exception.
>>
>> I suspect you started from a Windows Application template. You should
>> then switch the "Subsystem" to "Console" (on the "General" page of the
>> project configuration settings).
>
>
> Hi,
>     I started Today with D and VS too,
>      A quesiton please,
>  When I compile with dmd in console I get a *.exe in my current directory.
>  But when I compile with rdmd the exe is far away
> in User Local temp and with a long name, the same stuff with Visual
> Studio plugin.
> I am studying, no project yet, I want File alone compilation.
>   Could I set the directory Output for rdmd as dmd is doing, in the
> current directory ?
>  VS plugin is using rdmd, I believe.
>   Perhaps,.. Could I  switch to dmd in VS 2013?
>
> Greeting
>  thanks.
> (sorry my english)
>

rdmd is used for script-like usage of D source files, so leaving an executable inside the source folder is considered undesired.

Visual D only uses rdmd if you use "Compile and run/debug" on a single file. If you create a project, Visual D will usually create an output directory inside the project folder for you, but you can also configure this in the project configuration. Project builds use dmd for compilation, not rdmd.
March 16, 2017
On Friday, 10 March 2017 at 08:02:18 UTC, Rainer Schuetze wrote:
>
>
> On 09.03.2017 02:32, Jupiter wrote:
>>[...]
>
> rdmd is used for script-like usage of D source files, so leaving an executable inside the source folder is considered undesired.
>
> Visual D only uses rdmd if you use "Compile and run/debug" on a single file. If you create a project, Visual D will usually create an output directory inside the project folder for you, but you can also configure this in the project configuration. Project builds use dmd for compilation, not rdmd.

Ok,  I understood.
 Thank you
March 17, 2017
On Thursday, 9 March 2017 at 01:32:24 UTC, Jupiter wrote:
>  But when I compile with rdmd the exe is far away
> in User Local temp and with a long name, the same stuff with Visual Studio plugin.

Undocumented, but --build-only option will write exe to the current directory, rdmd also supports dmd's -of option.
« First   ‹ Prev
1 2