View previous topic :: View next topic |
Author |
Message |
Raynor
Joined: 04 Apr 2009 Posts: 4
|
Posted: Sat Apr 04, 2009 8:18 am Post subject: No console output |
|
|
Code: | import std.stdio;
void main(char[][] argv)
{
writefln("toto");
while (true)
{
}
} |
The generated executable works in a term but when i run it with descent it doesn't print anything. |
|
Back to top |
|
|
doob
Joined: 06 Jan 2007 Posts: 367
|
Posted: Sun Apr 05, 2009 3:38 am Post subject: |
|
|
Try without the while loop |
|
Back to top |
|
|
Raynor
Joined: 04 Apr 2009 Posts: 4
|
Posted: Sun Apr 05, 2009 4:35 am Post subject: |
|
|
Same result. It's weard because the program execution doesn't seem to finish in descent. |
|
Back to top |
|
|
3-S-E
Joined: 16 Jun 2008 Posts: 54
|
Posted: Sun Apr 05, 2009 6:27 am Post subject: |
|
|
And what happens, if you let your main()-Function return a value?
Code: |
import std.stdio;
int main(char[][] argv)
{
writefln("toto");
return 0;
}
|
Does it finish the program-execution now?
Or maybe you compile a completely other d-module? Make sure the precise module you want to compile is marked in your project-view. Sometimes I also wonder what a strange behavior happens and then I realize the wrong module is marked. |
|
Back to top |
|
|
Raynor
Joined: 04 Apr 2009 Posts: 4
|
Posted: Sun Apr 05, 2009 1:58 pm Post subject: |
|
|
It works when i select main.d. But i dont understand the logic of Descent. I must compile each d module like that? |
|
Back to top |
|
|
3-S-E
Joined: 16 Jun 2008 Posts: 54
|
Posted: Sun Apr 05, 2009 2:18 pm Post subject: |
|
|
No, you just need to select your program-entry-module.
I think descent needs the selection to fill some of its system-variables like ${resource_name}.
If that is so, you could try to write absolute paths at the "external tool configuration" in "Working Directory" and "Arguments" instead of using the variables.
I use DSSS (D Shared Software System). The only argument I need is "build" and as path I use an absolute path to my projects' root-directory. I'm tired of selecting! |
|
Back to top |
|
|
|