Monday, January 31, 2011

HOW TO SETUP DIRECTORIES IN C / C++

Hello Everyone,


If you are new to C language than you might have encounter an error while executing your program, even though the code is correct but you are still unable to execute it, and you receive errors something like this.




this error indicates that the compiler is unable to locate the header files on the specified path. So in order to rectify this error we need to setup correct directory setting


1. First make sure that the path of C is like this


X:\TC      (Where X can be any partition of you hard disk, lets assume it is your C drive)


so the path is C:\TC


Now open your C language by going to C:\TC\BIN\TC.exe


2. In the menu bar Click on Options and than click on Directories




When you click on Directories a window will be open like this




On this window we have to give correct path


Like we assumed that TC is located in our C partition


So the correct path would be


For Include         C:\TC\INCLUDE


For Library         C:\TC\LIB


For Output          C:\TC\BIN


3. After setting the directories Click on OK


We have successfully setup the directories, and you should be able to execute you code without any error. If you are still unable to execute it or receiving some other errors please post on comment.

7 comments:

  1. EVEN AFTER DOING ABOVE , I AM GETTING THE ERROR
    . I HAVE SEEN THAT IN INCLUDE FOLDER STDIO.H IS PRESENT. STILL I AM GETTING ERROR

    ReplyDelete
  2. Can you please post your coding here, and your directory setting

    ReplyDelete
  3. thanks it helped

    Can you please help me, I want to make a program in C which can print diamond in center of screeen. please send me the coding at sfakrko@hotmail.com

    thanks

    ReplyDelete
  4. Hello, after doing exactly what you wrote now it is giving me a different error while running the program

    FATAL Error Unable To Create Output File

    please HELP

    ReplyDelete
  5. still i'm getting the same errors:(
    help me!

    ReplyDelete
  6. Hello Sylvster, please download Turbo C Compiler from the link given below

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

    after downloading do all the setting mentioned on this page and than try to compile your Code. that should work

    Also read this post as well

    http://techgulf.blogspot.com/2011/02/fatal-error-unable-to-create-output.html

    Regards

    ReplyDelete
  7. Very good blog! Do you have any hints for aspiring writers?
    I'm hoping to start my own website soon but I'm a little lost on everything. Would you advise starting with a free platform like Wordpress or go for a paid option? There are so many options out there that I'm totally overwhelmed .. Any tips? Many thanks!
    Also see my web site > assurance dossier criminel

    ReplyDelete