Sign in to follow this  
1stMan

Missing an include file

Recommended Posts

Hi, Thanks for fixing my last poblem so fast everyone. Now then, a problem I'm having now is that an include file is missing from a program I am trying to run. At the top of the program it includes <graphics.h> but its not actually included in the project. The website I got it from doesn't seem to have it. Is it a standard file I can get from somewhere or is it user created. I know it has something to do with the <> or "" but I'm not sure which one is which. Thanks.

Share this post


Link to post
Share on other sites
Well the difference between sharp brackets and double quotes is that a double-quoted include will first be sought in the current (project) directory, while a bracketed include refers to a standard header, and will be sought in the compiler's include directories.

The file graphics.h is probably used for many things, but I remember it was a MS specific standard include file in old MS VC editions. So if someone should refer to graphics.h with brackets, it probably indicates that file.

Greetz,

Illco

Share this post


Link to post
Share on other sites
Well its defintely not a standard file it could be for some library or something.

Usually when this happens I search google for the file specified. I then look to see what functions are called from the graphics.h file in the code an compare and contrast to see if any of the functions in the .h file match up with the code, if so I try and compile with it.

It can be rather aggravating if they don't include something that tells you about this.

Share this post


Link to post
Share on other sites
As clapton said, graphics.h is an old BGI library header. If you're not using Borland C++, you neither have the header, nor the library. Your best bet is probably to port the code to SDL. It should be easy enough to figure out the correspondances by inferring what the functions are supposed to do from both their names and the context.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fruny
Your best bet is probably to port the code to SDL. It should be easy enough to figure out the correspondances by inferring what the functions are supposed to do from both their names and the context.


How do you do that?

Share this post


Link to post
Share on other sites
Replace all the functions in the library specified above ( Borland BGI graphics lib ) with functions from SDL. You do this by figuring out what each function from the Borland BGI graphics lib that's used in this project does from the aforementioned method, then find a function in SDL that -should- do nearly/exactly the same.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this