'How Do I include graphics.h in Codelite?

Is There a way to include graphics.h library in Codelite? I don't want to use CodeBlocks or Devc++. I need it for my university project. I know how to include it in CodeBlocks and Devc++ but there are a lot of errors when I use my old code I Wrote in Codelite. screenshot_screenshot



Solution 1:[1]

Interesting... This worked for me

I wrote a small program

#include <graphics.h>
#include <stdio.h>
#include <conio.h>


int main()
{ 
   int x = 320, y = 240, radius;
 
   initgraph();
 
   for ( radius = 25; radius <= 125 ; radius = radius + 20)
      circle(x, y, radius);
 
   getch();
   return 0;
}

and compiled it. It created a binary in the Debug folder named 'project'. When I run it by double clicking it does not show anything. So

1) I opened cmd
2) dragged the binary into it.. It saved me the time to type the path myself
3) Pressed enter
4) Does not work the first time
5) Pressed a key to come back to prompt
6) Pressed up key to execute the binary again and pressed enter
7) Did step 6 on the other display and it worked !!!

I know this is not a solution but still a starting point....

EDIT: I have a dual display and when I take the cmd prompt to one display it works and on the other it doesnt work... Probably it has something to do with the display parameters but I am not sure...

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community