Solved

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

Posted on 2004-08-14
7
10,221 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:deepthiji
  • 4
  • 3
7 Comments
 
LVL 9

Expert Comment

by:ankuratvb
ID: 11803798
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
 
LVL 9

Expert Comment

by:ankuratvb
ID: 11803806
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
 
LVL 3

Author Comment

by:deepthiji
ID: 11804354
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
Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

 
LVL 9

Accepted Solution

by:
ankuratvb earned 500 total points
ID: 11804792
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
 
LVL 3

Author Comment

by:deepthiji
ID: 11804833
Coool That Worked... Thanks a lot for the help..
Points for you.>)
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11804846
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
 
LVL 9

Expert Comment

by:ankuratvb
ID: 11804876
>I think now it will go to the EXE folder right/?

yeah.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now