'setfillstyle not working in c graphics while compiles on ubuntu

while writing c graphics program (in ubuntu ) setfillstyle not working.

   setfillstyle(1,RED);
   circle(50,100,5);
   floodfill(51,101,WHITE);

getting error as

/tmp/ccps2Qkp.o: In function `main':
demo.c:(.text+0x77): undefined reference to `setfillstyle'
collect2: error: ld returned 1 exit status

full code as follows

#include<graphics.h> 
int main()
{
   int gd = DETECT,gm;
   initgraph(&gd,&gm,NULL);

   setfillstyle(1,RED);
   circle(50,100,5);
   floodfill(51,101,WHITE); 

   delay(50000);
   closegraph();
   return 0;
}


Sources

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

Source: Stack Overflow

Solution Source