Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   C++ problem (http://www.go4expert.com/forums/cpp-problem-t15418/)

Carlos 6Dec2008 05:52

C++ problem
 
hello! Can anyone tell me how can i include graphics.h in Visual C++ language.
b/c in Turbo C, i use #include "graphics.h" to include graphics in my project.
but Visual C++ compiler give this error.
Error 1 fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory
reply me plz!

shabbir 6Dec2008 10:18

Re: C++ problem
 
Graphics package of Turbo C is only for BGI graphics and is not a part of Visual C++ compiler and so you would not be able to use BGI graphics in VC++

Carlos 6Dec2008 17:49

Re: C++ problem
 
So, how can i include graphics in Visual C++???

shabbir 6Dec2008 18:20

Re: C++ problem
 
It has its own GD library.

Carlos 7Dec2008 19:18

Re: C++ problem
 
So how to include that GD library in our program??
Plz tell me the method

shabbir 7Dec2008 19:40

Re: C++ problem
 
Which VC++ version you are using.

Carlos 7Dec2008 21:21

Re: C++ problem
 
I have installed Visual C++ 2005 Express Edition

shabbir 7Dec2008 22:40

Re: C++ problem
 
I am not sure of Express edition if its in built or you may need to download the package and install it.

skp819 12Dec2008 12:04

Re: C++ problem
 
It is simple, in your code you have the line

#include "graphics.h" or #include <graphics.h>

But the file graphics.h can not be found by the compiler.

If you have graphics.h on your computer then you must make sure that the path where it resides is in the include search path.

This is done through tools->options->projects and solutions->vc++ directories and switch show directories for to include files. Add the path to graphics.h there and then recompile. You must also make sure that any library files are also put into the lib path, this is done by switching show directories for to library files and then putting the path to the library files in there.

xpi0t0s 12Dec2008 13:48

Re: C++ problem
 
It's not that eay, skp819, the header file probably defines functions that can be found in a graphics library, so you also need to get the library.


All times are GMT +5.5. The time now is 04:29.