Solved

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

Posted on 2004-08-14
7
10,142 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

706 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

18 Experts available now in Live!

Get 1:1 Help Now