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.)