Saturday, February 5, 2011

FATAL ERROR UNABLE TO CREATE OUTPUT FILE IN C/ C++

In C language while executing your code you might have encountered an error




Fatal Unable to create output file



This Error means that the comipler is unable to create the output file on the specified path because either it doesn't exist or it is write protected


1. To fix this error open your C Compiler and check the directory setting by going to Options and than Directories
 Note down the output directory


2. Open my computer and browse to your TC folder, and than right click on the folder in which you are trying to create output file, and click on properties. In my case the folder is BIN


4. In the properties, make sure that the read-only option is unchecked click on apply


5. Windows will ask you to confirm changes, Select "Apply changes to this folder, subfolders and files", and than click on OK






We are done, and you should be able to execute your code without any error. If you are still having problem please post in comment.

P.S. If you are still having problem than please download a working copy of TC from HERE, and Extract this folder in your C Drive, so that the path to your bin folder is C:\tc\BIN

34 comments:

  1. thanks a lot i got clarified of the doubt i had from many days yours is a nice blog

    ReplyDelete
  2. thank u very much.i got useful answer through your blog again i really thank you.

    ReplyDelete
  3. i'm still getting the same problem.what am i supposed to do?

    ReplyDelete
  4. Which O/S are you using ? and from which partition are you running TC

    ReplyDelete
  5. great job man, thank u.. recommending this bolg to fren also...

    ReplyDelete
  6. Hello,I am getting an error in c++.I have written a simple program of 5 lines to print 'abc'.But wen i compile it shows 'compiling 881 lines'.It takes a very long time for compilation.And wen i stop compilation,it shows an error-unable to open file 'tclasss.lib'- a linktime error.plz help.Thank u.

    ReplyDelete
  7. You helped me very much!!!

    ReplyDelete
  8. Hello Deepti, please follow these steps


    1. In Turbo C Click on "Option" >> "Linker" >> "Libraries"

    There should be a cross Sign "X" before Container Class

    Just click on it to remove "X" , and click OK

    Now try to compile the Code, if you are still having problem than let me know

    ReplyDelete
  9. ya i having the problem what can i do?

    ReplyDelete
  10. Please download C Compiler from here and than try again

    http://uploaded.to/file/388fyahv

    ReplyDelete
  11. even i set read only option for bin..iam not able to write to file...iam using windows xp and tc is in c drive

    ReplyDelete
  12. @virinchi, copy tc to D or e drive and than compile.

    If you are getting this error in your school/university, it is because mostly network administrators block users from editing any file in C drive

    ReplyDelete
  13. prathamesh deshpande

    Still i having problem to execute code

    ReplyDelete
  14. i have error of :-
    unable to open include file 'iostream.h'
    unable to open include file 'conio.h'
    unable to open output file 'c:\tc\bin\noname02.obj'
    how can i fix these problems in my turbo c++

    ReplyDelete
    Replies
    1. Hello,
      I have updated my post at the bottom I have provided a link to download TC Compiler. This is a working copy of the compiler and it should work

      Remember to place it in your C Drive so that path to yout bin folder should be c:\tc\bin

      Delete
  15. I DO LIKE UR INSTUCTIONS BUT I GOT ERROR STILL

    ReplyDelete
  16. I DO LIKE UR INSTUCTIONS BUT I GOT ERROR STILL

    ReplyDelete
    Replies
    1. What error are you getting exactly ??

      Also did you download C Compiler from the link provided above ??

      Thanks

      Delete
  17. It was very helpful...thanks a lot ...:)

    ReplyDelete
  18. dude the link appears to be broken or rather it doesn't load after all.

    ReplyDelete
    Replies
    1. Helllo,
      Thank you for identifying the issue, I have updated the link

      Kindly check now.

      Delete
  19. Replies
    1. Did you download TC folder from this site ???

      Delete
  20. i m facing problem..... even on clicking apply and all that steps, on opening bin properties again , my read only is again checked.... may b becoz of this still i m unable to compile my program
    help....

    ReplyDelete
    Replies
    1. First enter in your BIN Folder than inside your bin folder select all items and than click on properties and than uncheck Read Only.

      Now Right click on your BIN Folder take properties and uncheck Read only

      If this does not work than Move your C Setup into partitions other than C Drive i.e. your System partition

      I hope it will solve your Problem

      Thanks

      Delete
  21. thanks .it worked

    ReplyDelete
  22. need help, not able to create output files..please help!!!

    ReplyDelete
    Replies
    1. Which is are you using ? And did you download turbo c from my blog ?

      Delete
  23. help please, still not workikng

    ReplyDelete
  24. I'm facing same problem and getting error like "UNABLE TO CREATE OUTPUT FILE'IOSTREAM.H\MUSAFIR.OBJ'" what to do now.

    ReplyDelete
    Replies
    1. Please download TC Setup from this post, and try again

      Delete