I am getting an error in Dev C++ with the function readimagefile. It says 'undefined reference to readimagefile' whenever I try to use the function included in the header file 'graphics.h'. Here is my code to show an image:
int main()
{
initwindow(600,600,"Trial");
readimagefile("alpha.jpg",0,0,500,500);
getch();
return 0;
}
It would be really helpful if someone could provide me with its correction or a substitute code to show an image. Also if I input this image, would I be able to use this as a background? If not then what is the best way to import an image as a background in C++.
I have seen many people asking for help about this and fair enough, these errors doesn't show up on other compilers like code blocks or visual studio but I have to use Dev C++ so please make sure that your code is applicable in Dev C++.