graphic.h not found error

Discussion in 'C Programming' started by Jignesh Danidhar, Apr 18, 2013.

  1. hi
    i am new in c programing i use gcc compiler and i have error graphic.h not found
    how can i solve this.
     
    Jignesh Danidhar, Apr 18, 2013
    #1
    1. Advertising

  2. Jignesh Danidhar

    Siri Cruise Guest

    In article <>,
    Jignesh Danidhar <> wrote:

    > hi
    > i am new in c programing i use gcc compiler and i have error graphic.h not
    > found
    > how can i solve this.


    That's not a standard C header, so it would be implementation specific header.
    It looks like maybe a Windows header, so you might get better answers at a
    Windows or Microsoft specific newsgroup.
    --
    Daddy says Mormons are all programmers because their god is Cobol. Should
    I ask Mormons to reschedule Bullwinkle?
    :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted.
     
    Siri Cruise, Apr 18, 2013
    #2
    1. Advertising

  3. Jignesh Danidhar

    James Kuyper Guest

    On 04/18/2013 12:04 AM, Jignesh Danidhar wrote:
    > hi
    > i am new in c programing i use gcc compiler and i have error graphic.h not found
    > how can i solve this.


    graphic.h is not a C standard library header, so in general you can't
    expect your compiler to know where to look for it. gcc allows you to
    specify a command line option, -I pathname, where pathname tells it
    where to look.

    Of course, that doesn't help if you don't know where the graphic.h is.
    What can you tell us about the reason why your code needs to #include
    graphic.h? If you're not sure, the simplest way to start the process of
    finding out is to remove the #include, and see what lines of code
    produce error messages due to its absence.
    --
    James Kuyper
     
    James Kuyper, Apr 18, 2013
    #3
  4. Jignesh Danidhar

    Ken Brody Guest

    On 4/18/2013 8:04 AM, James Kuyper wrote:
    > On 04/18/2013 12:04 AM, Jignesh Danidhar wrote:
    >> hi
    >> i am new in c programing i use gcc compiler and i have error graphic.h not found
    >> how can i solve this.

    >
    > graphic.h is not a C standard library header, so in general you can't
    > expect your compiler to know where to look for it. gcc allows you to
    > specify a command line option, -I pathname, where pathname tells it
    > where to look.
    >
    > Of course, that doesn't help if you don't know where the graphic.h is.
    > What can you tell us about the reason why your code needs to #include
    > graphic.h? If you're not sure, the simplest way to start the process of
    > finding out is to remove the #include, and see what lines of code
    > produce error messages due to its absence.


    Note that it's quite possible to remove a header file, have the program
    compile and link without errors (though perhaps with warnings), and fail to
    run because of the missing header.

    Ignoring the "let's cast malloc() to get rid of the type mismatch warning"
    scenario, what about something as simple as:

    fseek(f,0,0);

    If sizeof(int)!= sizeof(long), the above will most likely fail at runtime.

    (Yes, I know that should really be "SEEK_SET" and not "0" as the 3rd
    parameter. But a lot of legacy Unix code looks like the above, though
    perhaps with "0L" as the 2nd parameter.)
     
    Ken Brody, Apr 18, 2013
    #4
  5. Jignesh Danidhar

    James Kuyper Guest

    On 04/18/2013 09:01 AM, Ken Brody wrote:
    > On 4/18/2013 8:04 AM, James Kuyper wrote:
    >> On 04/18/2013 12:04 AM, Jignesh Danidhar wrote:
    >>> hi
    >>> i am new in c programing i use gcc compiler and i have error graphic.h not found
    >>> how can i solve this.

    >>
    >> graphic.h is not a C standard library header, so in general you can't
    >> expect your compiler to know where to look for it. gcc allows you to
    >> specify a command line option, -I pathname, where pathname tells it
    >> where to look.
    >>
    >> Of course, that doesn't help if you don't know where the graphic.h is.
    >> What can you tell us about the reason why your code needs to #include
    >> graphic.h? If you're not sure, the simplest way to start the process of
    >> finding out is to remove the #include, and see what lines of code
    >> produce error messages due to its absence.

    >
    > Note that it's quite possible to remove a header file, have the program
    > compile and link without errors (though perhaps with warnings), and fail to
    > run because of the missing header.
    >
    > Ignoring the "let's cast malloc() to get rid of the type mismatch warning"
    > scenario, what about something as simple as:
    >
    > fseek(f,0,0);
    >
    > If sizeof(int)!= sizeof(long), the above will most likely fail at runtime.
    >
    > (Yes, I know that should really be "SEEK_SET" and not "0" as the 3rd
    > parameter. But a lot of legacy Unix code looks like the above, though
    > perhaps with "0L" as the 2nd parameter.)


    You're right. It's a very simple first step that can be taken even if
    you're thoroughly confused, which stands a decent chance of providing
    useful information to help resolve that confusion - but it's not
    guaranteed to do so.
    --
    James Kuyper
     
    James Kuyper, Apr 18, 2013
    #5
  6. Jignesh Danidhar

    John Gordon Guest

    In <> Jignesh Danidhar <> writes:

    > hi
    > i am new in c programing i use gcc compiler and i have error
    > graphic.h not found how can i solve this.


    Graphics aren't part of the standard C language. Are you trying to compile
    a program you found on the web somewhere, or are you writing your own?

    --
    John Gordon A is for Amy, who fell down the stairs
    B is for Basil, assaulted by bears
    -- Edward Gorey, "The Gashlycrumb Tinies"
     
    John Gordon, Apr 18, 2013
    #6
  7. Ken Brody <> writes:
    [...]
    > Note that it's quite possible to remove a header file, have the program
    > compile and link without errors (though perhaps with warnings), and fail to
    > run because of the missing header.
    >
    > Ignoring the "let's cast malloc() to get rid of the type mismatch warning"
    > scenario, what about something as simple as:
    >
    > fseek(f,0,0);
    >
    > If sizeof(int)!= sizeof(long), the above will most likely fail at runtime.

    [...]

    Calling a function with no visible declaration is a constraint violation
    as of C99; in principle, that's just as bad as a syntax error.

    Unfortunately, a lot of compilers either don't complain about such
    things, or don't complain (IMHO) vociferously enough.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Working, but not speaking, for JetHead Development, Inc.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, Apr 18, 2013
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William Parker
    Replies:
    1
    Views:
    3,095
    Martin
    Jun 27, 2004
  2. Replies:
    3
    Views:
    551
  3. 50 SOMETHING GAL
    Replies:
    3
    Views:
    401
  4. Trent Mick
    Replies:
    0
    Views:
    479
    Trent Mick
    Apr 3, 2008
  5. Jacob Davis
    Replies:
    0
    Views:
    502
    Jacob Davis
    Apr 15, 2008
Loading...

Share This Page