How to resolve the undefined reference error to readimagefile in dev C++ : <p>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:</p>

<pre><code>int main()
{
    initwindow(600,600,"Trial");
    readimagefile("alpha.jpg",0,0,500,500);
    getch();
    return 0;
}
</code></pre>

<p>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++.</p>

<p>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++.</p>
