SDL image/libpng/VS2010

Hi.
I’ve just a “simple” question. How am I to interpret this error message? I’ve tried googling a lot of permutations but the closest I’ve gotten is about SDL and VS settings which I know are set correctly (I can load bmps, gifs AND jpegs for instance and jpeg.dll is in the same folder and libpng12-0.dll, but as soon as I change the path to point to any png-image I get the error message below)

"IMG_Load: Failed loading libpng12-0.dll: %1 is not a valid Win32 application."
SDL 1.2.14
SDL 1.2.10 (obviously)
VS2010

Hi

I assume you’ve called IMG_Init(IMG_INIT_PNG) ?

But that error message is something more fundamental. Did you recompile the libraries yourself? Also, just make sure that Configuration Type in your project properties->general is set to static library, and not application (.exe). Basic, but you’d be surprised how many people change this and wonder why nothing works.

Ed

ebyard wrote:

I assume you’ve called IMG_Init(IMG_INIT_PNG) ?

ehm…actually no (I’m too embarrassed to say why) but it works without IMG_Init anyway.

ebyard wrote:

But that error message is something more fundamental.

Yup, you were right, seems I was missing zlib, which I don’t understand why the error message didn’t mention (I used the dlls from SDL_Image VC).

Anyway, thanks for your help. I haven’t used SDL before so I didn’t know what to think of that error message.