Problem with graphics.h and eclipse cdt


I'm trying to create a program using graphics.h (from here ), which has 3 files: graphics.h, winbgim.h and lbbgi.a, in Eclipse CDT.
First of all, if my computer doesn't magically change code when downloads it (that I don't think so), graphics.h has an error in function printimage (line 302), when declarates two int variables with the same name: right. So I looked below in the code into another functions and just changed the former right to top.

I downloaded Eclipse CDT about two months ago (maybe less) with the latest MinGW compiler. Before that, I used Bloodshed Dev-C++ but, because of the extremely new compiler, it didn't work anymore. Anyway, I just kept working in eclipse, very happy. Now I'm trying to make a program using graphics.h. I've copied graphics.h and winbgim.h to include directory of MinGW, and lbbgi.a to lib. I read a little more and found out that I needed some linker libs for this to work, right here Because this page says how to do it in Dev, I just had to find how to do it in Eclipse. The solution is here
When I did all this, the program compiled perfectly (no redefinition or undefined reference errors). Then, I tried a simple program:
#include <graphics.h>

int main( )
    initwindow(400, 300, "First Sample");
    circle(100, 50, 40);
    while (!kbhit( ))
    return 0;

which should simply print a circle, but it just doesn't work. It can't even pass from initwindow. So I googled and almost anyone uses this graphics.h with a new compiler; and it's really strange that if you install the devpak ( in Dev-C++, it works perfectly.
If anyone could help me, I'd really appreciate it. I'll provide any info you'd like in order to solve this.
Thank you
Topic archived. No new replies allowed.