Home Download Buy Blog Forum Support

[C] Terminal cannot input

[C] Terminal cannot input

Postby zxzwa on Tue Feb 21, 2012 9:48 pm

I am a new user of this fine piece of software and overall I love it so far, but I've stumbled upon a huge problem that has twisting my head for over a day. Without a fix I can't integrate to Sublime Text 2.

My problem:
The terminal skips the input and shows me [Finished].

While compiling the following C code:
Code: Select all
#include <stdio.h>

int main (void){
   char ch;

   ch = getchar(); /*  This line is the cause of the problem, the input */

   return 0;
}


My C.sublime-build:
Code: Select all
{
   "cmd": ["tcc", "-run", "$file"],
   "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
   "selector": "source.c"
}


Note: My platform is Windows 7 and I use tcc for compiling C.

I've searched for an answer, but couldn't find anything. Thank you in advance!
zxzwa
 
Posts: 1
Joined: Tue Feb 21, 2012 9:34 pm

Re: [C] Terminal cannot input

Postby jps on Wed Feb 22, 2012 10:22 am

stdin isn't connected when running via Sublime Text, so interactive input won't work
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: [C] Terminal cannot input

Postby tdus on Thu Jun 06, 2013 2:52 pm

i have the problem too.
tdus
 
Posts: 1
Joined: Thu Jun 06, 2013 2:50 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 12 guests