• C

ERROR:fatal.....\INCLUDE\STDIO.H 9: Unable to create output file 'Game.obj' pls help

hi,
I am using turbo C++ Ms mode compiler. It was working fine untill yesterday. below is the program that i wrote last week and i tried to run this today (it was working fine last week)and it gave me the following error.
fatal.....\INCLUDE\STDIO.H 9: Unable to create output file  'Game.obj'
I can run some programs but not all, below is the one of the few programs that i cannot run.

#include<stdio.h>
#include<conio.h>
void main()
{
int i=21,n,k,sum=0;
clrscr();
while(i>1)
{
printf ("\n\nSelect any number from 1,2,3,4");
scanf ("%d",&n);
if(n>4)
{
printf ("Error");
break;
}
k=5-n;
printf ("\n\nComputer assigns %d ",k);
i=i-(k+n);
sum=sum+k+n;
printf ("\n\nTotal match sticks choosen= %d",sum);
if(i==1)
printf ("\n\nThere is only one more remainning so you lost the game");
}
getch();
}
please help me to find the problem,
thanks
deep
LVL 3
deepthijiAsked:
Who is Participating?
 
ankuratvbConnect With a Mentor Commented:
Specify any valid directory as the output directory.

I generally create a directory to store the executables.For e.g. create a dir. called EXE in C:\TC and make the output directory entry as C:\TC\EXE

You can specify any existing directory path as the output directory.That dir. will be used to store the obj and the exe files for the source files that you compile and run.

You can leave the source directory entry blank.

>>
I dont have problem running all the programs, If the output directory does not exist , should i have problem running all the programs?
<<

If the o/p dir. does not exist,you should have a problem running all your programs.Try giving a valid path in the o/p dir. and see if all your programs are working.

If some of the programs are working,do check for hard disk space(this might be due to no space caused by disk full)
0
 
ankuratvbCommented:
Hi deep,

This error occurs due to 2 reasons:

Either the disk is full,

OR

The output directory does not exist.

Most probably,your output directory has been set to a directory which doesnt exist.

If you're using the IDE,goto Options->Directories->Output Directory
and specify a valid path.
0
 
ankuratvbCommented:
If you're using tcc,
use :
tcc -Ic:\tc\include -Lc:\tc\lib -nc:\tc filename.c

-n[Output Directory]
-I[Include Directory]
-L[Lib Directory]
0
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

 
deepthijiAuthor Commented:
I am using Turbo C++ IDE,
 I went to Options->Directories->
These are the entries there.

Include Directories...... C:\TC\INCLUDE

Library Directories....... C:\TC\LIB

Output Directory......     Nothing here(What should i Add Here Newbie^_^)

Source Directories....... Nothing here toooo
>>The output directory does not exist

I dont have problem running all the programs, If the output directory does not exist , should i have problem running all the programs?
0
 
deepthijiAuthor Commented:
Coool That Worked... Thanks a lot for the help..
Points for you.>)
0
 
deepthijiAuthor Commented:
Earlier all the .OBJ and .EXE files were in the bin folder, I think now it will go to the EXE folder right/?
anyway everything is working fine now
thanks
deep
0
 
ankuratvbCommented:
>I think now it will go to the EXE folder right/?

yeah.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.