FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

No console output

 
Post new topic   Reply to topic     Forum Index -> Descent
View previous topic :: View next topic  
Author Message
Raynor



Joined: 04 Apr 2009
Posts: 4

PostPosted: Sat Apr 04, 2009 8:18 am    Post subject: No console output Reply with quote

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
View user's profile Send private message
doob



Joined: 06 Jan 2007
Posts: 367

PostPosted: Sun Apr 05, 2009 3:38 am    Post subject: Reply with quote

Try without the while loop
Back to top
View user's profile Send private message
Raynor



Joined: 04 Apr 2009
Posts: 4

PostPosted: Sun Apr 05, 2009 4:35 am    Post subject: Reply with quote

Same result. It's weard because the program execution doesn't seem to finish in descent.
Back to top
View user's profile Send private message
3-S-E



Joined: 16 Jun 2008
Posts: 54

PostPosted: Sun Apr 05, 2009 6:27 am    Post subject: Reply with quote

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. Rolling Eyes
Back to top
View user's profile Send private message
Raynor



Joined: 04 Apr 2009
Posts: 4

PostPosted: Sun Apr 05, 2009 1:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
3-S-E



Joined: 16 Jun 2008
Posts: 54

PostPosted: Sun Apr 05, 2009 2:18 pm    Post subject: Reply with quote

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! Rolling Eyes
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Descent All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group