Thread: header files not found

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    7

    header files not found

    Hi all,

    I am trying to build a project in VC++, but most of the time I keep getting the following error:

    Cannot open include file: 'xyz.h': No such file or directory, where xyz is the header file which the programs are calling..

    I have made sure to include that header file using project->add existing item.
    I also manually put the header file in the main project folder..
    but still... it's giving the same error..

    The code uses "xyz.h" format.. is this a problem?? coz even changing it to <xyz.h> doesn't help..

    Many thanks,

    Abhi

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Can't help you much without sitting at your computer. Look at your include directory to see where VS is looking for your header files, and put the header there. Make sure the header has the name you think it does.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    I think your header file path should be give in the include path of your VS configuration

  4. #4
    Registered User Dawnson's Avatar
    Join Date
    Oct 2009
    Location
    In front of my computer
    Posts
    6
    Maybe You can solve it by rebuilding the compile.

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Know that simply #include "whatever" does not include whatever just because it is part of the project. The #include works on the filesystem level, so the whatever has to exist in the same directory as the source file that includes it. Otherwise you must specify a search path to that file that is relative to the source file (or an absolute path if you wish).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. #include header files or .cpp files?
    By DoctorX in forum C++ Programming
    Replies: 3
    Last Post: 12-23-2006, 12:21 PM
  2. Line Counting
    By 00Sven in forum C Programming
    Replies: 26
    Last Post: 04-02-2006, 08:59 PM
  3. Header files
    By earth_angel in forum C++ Programming
    Replies: 8
    Last Post: 07-12-2005, 11:17 AM
  4. Many Header Files
    By matth in forum C++ Programming
    Replies: 3
    Last Post: 03-08-2005, 02:45 PM