Undefined reference to _IMG_LoadPNG_RW

Wheter trying with loadPNG or IMG_Load I get undefined reference error.

image=IMG_LoadPNG_RW(rwop);
// image=IMG_Load(“lena.png”);

Thanks for your help.
Michael

Wheter trying with loadPNG or IMG_Load I get undefined reference error.

image=IMG_LoadPNG_RW(rwop);
// image=IMG_Load(“lena.png”);

You should use IMG_Load_RW() instead.
e.g.
image = IMG_Load_RW(rwop, 0);

If you’re still having problems, make sure that your version of SDL_image
has been built with PNG support, make sure that you have the PNG library
available (on Windows this means including the PNG DLL that comes with
SDL_image).

If you’re still having problems after checking both of those, let us know,
including the version of SDL_image, what platform you’re on, and where your
PNG library is.

See ya!
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC