Header Files creating a problem

HI

I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?

Please help!!

Comments

  • : HI
    :
    : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    :
    : Please help!!
    :

    Check Options->Directores. The first two paths should be something like:
    C: cinclude
    C: clib
  • : HI
    :
    : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    :
    : Please help!!
    :

    Do a search for iostream.h and take note of the directory it is in, then set your compiler to "look" at that directory during compile time. Since the filename is enclosed like this: instead of this: "iostream.h", it will look to the default directory which is set in you .mak file (which is probably generated for you).

    If the name is enclosed in "" then the comiler will look in the current directory, which is useful if you create your own .h files and keep them in the same directory as your main project file.
  • : : HI
    : :
    : : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    : :
    : : Please help!!
    : :
    :
    : Do a search for iostream.h and take note of the directory it is in, then set your compiler to "look" at that directory during compile time. Since the filename is enclosed like this: instead of this: "iostream.h", it will look to the default directory which is set in you .mak file (which is probably generated for you).
    :
    : If the name is enclosed in "" then the comiler will look in the current directory, which is useful if you create your own .h files and keep them in the same directory as your main project file.
    :

    Okay, I am going to assume you are at least a semi-smart person and managed to install TC correctly and that your header files are in the right include directory.

    These responses you have been getting are from people who can't think outside the box or have somewhat poor programming practices (dont take personal offense to this guys, it is called constructive criticism). They think because your program is not responding to your #include statements that the files are corrupt. I think this is the wrong idea here.

    I think the problem is really pretty simple here. I have made sure that I remember to use this simple trick since my CS 115 days. When you start to develop code that will be cross-platform the header files will be in different places and the compiler will have either more relaxed or stricter rules.

    Ok, enuff babbling, here is your solution. I don't think your compiler recognizes which ANSI/ISO standard to use unless you explicitly tell it. So right underneath your #include put the following:

    using namespace std;

    This should fix the problem as it tells the compiler to use its standard header names. Always put this in the top part of your ur program! It is amazing that on some compilers a Hello World program will not run unless you have this included right after your preprocessor commands.

    Your Welcome,
    The Code Guru

  • : : : HI
    : : :
    : : : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    : : :
    : : : Please help!!

    These responses you have been getting are from people who can't think outside the box or have somewhat poor programming practices (dont take personal offense to this guys, it is called constructive criticism). They think because your program is not responding to your #include statements that the files are corrupt. I think this is the wrong idea here.

    ---------------------------------------------

    I prefer to accuse people of having trouble thinking outside of their cubicles (instead of box), else I risk stepping over that fine line that separates the divinely informed from the pompous.

    I don't think that the files are corrupt. I believe they are either not installed, or the .mak file is not pointing to them.

    The error "Unable to open" is one I have seen often and means I am either not "pointing" the nmake utility at the right directory, or the file doesn' exist.

    I use almost exclusively the command line for compiling and linking, frankly just because problems like this pop up. Find out which directory your project is in, then open the .mak file with a word processer (I use "edit" from DOS). You will see a file that has similar wording to this:

    [code]
    # Module Name: makefile
    #
    # Module Desc: Microsoft Make file
    #
    #
    #
    ROOT = .... #the develop directory location
    MSC = g: f5
    FASTC = g: f5inmicrosoft
    HEADFILES = ol_api.h gh_err.h
    OBJS = g: f5
    INCLUDES = /I$(ROOT)ininc /I$(MSC)include /I$g:c_files
    LINK = $(MSC)inlink
    #LIBS = $(MSC)libllIBCE.lib $(ROOT)inmicrosoftol_api.lib
    LIBS = $(FASTC)ol_api.lib $(FASTC)lcc_l.lib $(FASTC)xmod_l.lib $(FASTC)zmod_l.lib
    LFLAGS = /MAP /SEGMENTS:512 /STACK:16384
    LFLAGSTSR = /MAP /SEGMENTS:512
    C = $(MSC)incl
    CFLAGS = /Os /AH /Bd /Gs /Gy /G3 /Zp1 /Fo$(OBJS) /Lr /c $(INCLUDES) /nologo
    ASM = ML
    MAP = NUL

    [/code]

    Note the line that starts with "INCLUDES". This is the line that tells the nmake function where to look for your include files. Add to the end of this line the full path to the directory where you found your include files. For instance, if you know your iostream.h file is located in C:TCINC directory, append that to the INCLUDE line. In my case I would change the above INCLUDE line like this:
    [code]
    INCLUDES = /I$(ROOT)ininc /I$(MSC)include /I$g:c_files C:TCINC
    [/code]


  • : : : HI
    : : :
    : : : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    : : :
    : : : Please help!!
    : : :
    : :
    : : Do a search for iostream.h and take note of the directory it is in, then set your compiler to "look" at that directory during compile time. Since the filename is enclosed like this: instead of this: "iostream.h", it will look to the default directory which is set in you .mak file (which is probably generated for you).
    : :
    : : If the name is enclosed in "" then the comiler will look in the current directory, which is useful if you create your own .h files and keep them in the same directory as your main project file.
    : :
    :
    : Okay, I am going to assume you are at least a semi-smart person and managed to install TC correctly and that your header files are in the right include directory.
    :
    : These responses you have been getting are from people who can't think outside the box or have somewhat poor programming practices (dont take personal offense to this guys, it is called constructive criticism). They think because your program is not responding to your #include statements that the files are corrupt. I think this is the wrong idea here.
    :
    : I think the problem is really pretty simple here. I have made sure that I remember to use this simple trick since my CS 115 days. When you start to develop code that will be cross-platform the header files will be in different places and the compiler will have either more relaxed or stricter rules.
    :
    : Ok, enuff babbling, here is your solution. I don't think your compiler recognizes which ANSI/ISO standard to use unless you explicitly tell it. So right underneath your #include put the following:
    :
    : using namespace std;
    :
    : This should fix the problem as it tells the compiler to use its standard header names. Always put this in the top part of your ur program! It is amazing that on some compilers a Hello World program will not run unless you have this included right after your preprocessor commands.
    :
    : Your Welcome,
    : The Code Guru
    :
    :

    TC does not support [b]namespace[/b]
    http://info.borland.com/education/bcppbuilder/tcppmatrix.html

  • Thanx to all of ur for ur instant replies.

    I would try all the solutions one by one and wud surely get the result out in no time.

    Thna x all of u once again !!

    : : : : HI
    : : : :
    : : : : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    : : : :
    : : : : Please help!!
    : : : :
    : : :
    : : : Do a search for iostream.h and take note of the directory it is in, then set your compiler to "look" at that directory during compile time. Since the filename is enclosed like this: instead of this: "iostream.h", it will look to the default directory which is set in you .mak file (which is probably generated for you).
    : : :
    : : : If the name is enclosed in "" then the comiler will look in the current directory, which is useful if you create your own .h files and keep them in the same directory as your main project file.
    : : :
    : :
    : : Okay, I am going to assume you are at least a semi-smart person and managed to install TC correctly and that your header files are in the right include directory.
    : :
    : : These responses you have been getting are from people who can't think outside the box or have somewhat poor programming practices (dont take personal offense to this guys, it is called constructive criticism). They think because your program is not responding to your #include statements that the files are corrupt. I think this is the wrong idea here.
    : :
    : : I think the problem is really pretty simple here. I have made sure that I remember to use this simple trick since my CS 115 days. When you start to develop code that will be cross-platform the header files will be in different places and the compiler will have either more relaxed or stricter rules.
    : :
    : : Ok, enuff babbling, here is your solution. I don't think your compiler recognizes which ANSI/ISO standard to use unless you explicitly tell it. So right underneath your #include put the following:
    : :
    : : using namespace std;
    : :
    : : This should fix the problem as it tells the compiler to use its standard header names. Always put this in the top part of your ur program! It is amazing that on some compilers a Hello World program will not run unless you have this included right after your preprocessor commands.
    : :
    : : Your Welcome,
    : : The Code Guru
    : :
    : :
    :
    : TC does not support [b]namespace[/b]
    : http://info.borland.com/education/bcppbuilder/tcppmatrix.html
    :
    :

  • I actually want a project to be sumbitted for my Board Examinations. I made one in Hospital management at school but when I run the same at my home computer; it gives the errors about the header files. So, if anyone of you cud get me a working project for a 12th standard student !!

    Thanx:)


    : Thanx to all of ur for ur instant replies.
    :
    : I would try all the solutions one by one and wud surely get the result out in no time.
    :
    : Thna x all of u once again !!
    :
    : : : : : HI
    : : : : :
    : : : : : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    : : : : :
    : : : : : Please help!!
    : : : : :
    : : : :
    : : : : Do a search for iostream.h and take note of the directory it is in, then set your compiler to "look" at that directory during compile time. Since the filename is enclosed like this: instead of this: "iostream.h", it will look to the default directory which is set in you .mak file (which is probably generated for you).
    : : : :
    : : : : If the name is enclosed in "" then the comiler will look in the current directory, which is useful if you create your own .h files and keep them in the same directory as your main project file.
    : : : :
    : : :
    : : : Okay, I am going to assume you are at least a semi-smart person and managed to install TC correctly and that your header files are in the right include directory.
    : : :
    : : : These responses you have been getting are from people who can't think outside the box or have somewhat poor programming practices (dont take personal offense to this guys, it is called constructive criticism). They think because your program is not responding to your #include statements that the files are corrupt. I think this is the wrong idea here.
    : : :
    : : : I think the problem is really pretty simple here. I have made sure that I remember to use this simple trick since my CS 115 days. When you start to develop code that will be cross-platform the header files will be in different places and the compiler will have either more relaxed or stricter rules.
    : : :
    : : : Ok, enuff babbling, here is your solution. I don't think your compiler recognizes which ANSI/ISO standard to use unless you explicitly tell it. So right underneath your #include put the following:
    : : :
    : : : using namespace std;
    : : :
    : : : This should fix the problem as it tells the compiler to use its standard header names. Always put this in the top part of your ur program! It is amazing that on some compilers a Hello World program will not run unless you have this included right after your preprocessor commands.
    : : :
    : : : Your Welcome,
    : : : The Code Guru
    : : :
    : : :
    : :
    : : TC does not support [b]namespace[/b]
    : : http://info.borland.com/education/bcppbuilder/tcppmatrix.html
    : :
    : :
    :
    :

  • : These responses you have been getting are from people who can't think outside the box or have somewhat poor programming practices (dont take personal offense to this guys, it is called constructive criticism). They think because your program is not responding to your #include statements that the files are corrupt. I think this is the wrong idea here.

    My response came from the experience of installing TC uncountable times, and the most common error is that the paths are incorrect, as I described. It is unclear whether he has attempted to change them or not.

    Sence you don't know that TC follows an ancient C++ standard, you have obviously not used it yourself. That means that you are not giving constructive criticism, you are just babbling.
  • : : These responses you have been getting are from people who can't think outside the box or have somewhat poor programming practices (dont take personal offense to this guys, it is called constructive criticism). They think because your program is not responding to your #include statements that the files are corrupt. I think this is the wrong idea here.
    :
    : My response came from the experience of installing TC uncountable times, and the most common error is that the paths are incorrect, as I described. It is unclear whether he has attempted to change them or not.
    :
    : Sence you don't know that TC follows an ancient C++ standard, you have obviously not used it yourself. That means that you are not giving constructive criticism, you are just babbling.
    :

    Not only that, but also I dont't think that this statement is true:

    [quote]
    using namespace std;

    This should fix the problem as it tells the compiler to use its standard header names.
    [/quote]


    This lets us access the classes, objects and/or functions in the std namespace scope without having to use the fully qualified names (i.e. cout vs. std::cout), but I can't find anything anywhere that says it "tells the compiler to use its standard header names".
    [italic][blue]To understand recursive, first you need to understand recursive[/blue][/italic]

  • HI

    I tried using the statement "using namespace std;" but now it gives me error " Unable to create ouput file ; project.cpp" , what do I do now ?

    : : : These responses you have been getting are from people who can't think outside the box or have somewhat poor programming practices (dont take personal offense to this guys, it is called constructive criticism). They think because your program is not responding to your #include statements that the files are corrupt. I think this is the wrong idea here.
    : :
    : : My response came from the experience of installing TC uncountable times, and the most common error is that the paths are incorrect, as I described. It is unclear whether he has attempted to change them or not.
    : :
    : : Sence you don't know that TC follows an ancient C++ standard, you have obviously not used it yourself. That means that you are not giving constructive criticism, you are just babbling.
    : :
    :
    : Not only that, but also I dont't think that this statement is true:
    :
    : [quote]
    : using namespace std;
    :
    : This should fix the problem as it tells the compiler to use its standard header names.
    : [/quote]
    :
    :
    : This lets us access the classes, objects and/or functions in the std namespace scope without having to use the fully qualified names (i.e. cout vs. std::cout), but I can't find anything anywhere that says it "tells the compiler to use its standard header names".
    : [italic][blue]To understand recursive, first you need to understand recursive[/blue][/italic]
    :
    :

  • : HI
    :
    : I tried using the statement "using namespace std;" but now it gives me error " Unable to create ouput file ; project.cpp" , what do I do now ?


    Now you read what dwccgc posted.

  • Hi

    The first two paths are the same way u told. Please help. its still giving error. If I use the namespace coding; it is unable to create the object. Please Help

    : : HI
    : :
    : : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    : :
    : : Please help!!
    : :
    :
    : Check Options->Directores. The first two paths should be something like:
    : C: cinclude
    : C: clib
    :

  • : Hi
    :
    : The first two paths are the same way u told. Please help. its still giving error. If I use the namespace coding; it is unable to create the object. Please Help

    [blue]
    As already mentioned in other posts, TC doesn't support namespace. It follows an old C++ standard. The person that suggested that you should use it doesn't know what he is talking about, unfortunatly.

    If you want to follow the standard, I suggest that you get a modern compiler. Borland, Microsoft and GNU have all got excellent free compilers.

    If you insist using TC, which version of it do you have? (by the way, some of those old compilers are also free and can be found at http://bdn.borland.com/museum/)

    Another thing you can check is if the TCInstall dir does contain any files... The installation is designed for 3 floppy disks and might fail to add one or more of these disks if one isn't carefull. You should probably try to re-install it anyway, if you haven't already...


    [/blue]
    :
    : : : HI
    : : :
    : : : I just made a project in C++ and loaded TC on my computer. Now when I try to compile the project; it gives me error " unable to open header file or rather any header file for that matter. I have the full version of TurboC on my computer then why am I getting this error?
    : : :
    : : : Please help!!
    : : :
    : :
    : : Check Options->Directores. The first two paths should be something like:
    : : C: cinclude
    : : C: clib
    : :
    :
    :

  • [b][red]This message was edited by mustafizur at 2006-1-21 6:8:23[/red][/b][hr]
    hi;
    i am mustafizur rohman, also a class xii student doing the same project from my board exams. i have completed it succesfully. if you want any more info mail me at mustafizur_04@sify.com. you can also send me your complete source code so that i may help. if u wish we can also share it.
    with best wishes for the board exams.
    mustafizur



  • : hi;
    : i am mustafizur rohman, also a class xii student doing the same project from my board exams. i have completed it succesfully. if you want any more info mail me at mustafizur_04@sify.com. you can also send me your complete source code so that i may try to help. if u wish we can also share it.
    : with best wishes for the board exams.
    : mustafizur
    :
    :


    Might be smart to check the dates of the posts before you reply, don't you think?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories