Sunday, March 23, 2008

graphics.h without Turbo C/C++

hmm.........this first post took a long time coming..... :-D

I personally hate using the Turbo C/C++ compiler, no, its not a bad compiler, but its well past its sell-by date. It was one the best compilers earlier, not anymore....

When using Linux I obviously use the gcc.
When using Windows, i use the Dev-C ++ IDE.

Many people ( mostly 2nd year comp. engg. students from Pune University :P) complain that one cannot use the "graphics.h" with any other IDE, well, u can..just follow these steps..

1. Get Dev-C ++

2. Install Dev-C++ ( i usually prefer following the default install path in case of compilers ).

3. Get the "graphics.h" and the "libbgi.a" files from Here ....credit for these files goes to Michael Serrano.

Note: Copying the files from the Turbo C directory may not work ( i haven't tried it ..).

4. Copy the "grahpics.h" files to : C:\Dev-Cpp\include
and the "libbgi.a" file to : C:\Dev-Cpp\lib

Note : Your paths might be different, please check where Dev-C++ is installed on your system.

5.Start Dev-C++ . now Tools-->Compiler Options

6.Tick the "Add these commands to the linker...." and within the box , paste the following line :

-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32

This tells your linker what all extra libraries it should link....

Now its all done, enjoy the Turbo C++ graphics library on Dev- C++


Note: This is not the only place where you will find such a tutorial...i haven't devised this method, only the linker part is mine :-)

4 comments:

  1. good....atleast now it will be easier for u guys to take the Graphics prints...
    for us it was a royal pain....

    ReplyDelete
  2. Yeah, taking output is much easier :)

    ReplyDelete
  3. You can also try out Quincy 2005
    It comes with built in BGI libraries !!

    ReplyDelete
  4. I had tried "copy-pasting" TCC files.. :P. Didn't work.. :P.

    ReplyDelete