SDL_image... aieeeeeeeeeee!

Post: #1

I was unable to get the function SDL_LoadPNG_RW to work whatsoever with only the SDL.framework.. Apparently only SDL_LoadBMP is included with the standard framework?

Anyways, I downloaded SDL_image.framework, added the framework to my "SDL Application" project, and I still can't get Xcode to recognize that I've added the framework... Apparently SDL_LoadPNG_RW is still "implicitly declared" (ie, it can't be found in any of the headers...

I've tried adding #include "SDL_image.h", "SDL/SDL_image.h" to my main.c file, the SDLMain.c file, and the SDLMain.h file, and I still can't properly load a PNG.. anyone know what's going on?

also, I guess my follow up question is whether it's possible to load a PNG without the SDL_image framework... thanks in advance. Wacko
Quote this message in a reply
Posts: 320
Joined: 2003.06
Post: #2
I think it should be
#include <SDL_image/SDL_image.h>

If that doesn't work, also try adding /Library/Frameworks/SDL_image.framework/Headers to your Header Search Paths in the project's get info window.

Chopper, iSight Screensavers, DuckDuckDuck:
Quote this message in a reply
Posts: 713
Joined: 2002.04
Post: #3
Quote:whether it's possible to load a PNG without the SDL_image framework

Not without coding your own loader.

Probably your error is that there is no function named "SDL_LoadPNG_RW"; all SDL_image functions have the prefix "IMG_", so you should be using "IMG_LoadPNG_RW", and a quick look at the documentation confirms it.

Mark Bishop
Student and freelance OS X & iOS developer
Quote this message in a reply
Post: #4
okay sealfin, thanks, apparently I can't read. Blink
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Trouble using SDL_image with XCode 3.2.3 Snow Leopard code4fun 1 5,929 Sep 22, 2010 10:47 PM
Last Post: OneSadCookie
  SDL_image and bmp loading Duane 13 13,305 Dec 21, 2009 09:14 AM
Last Post: Skorche
  Installing SDL_image &amp; SDL_mixer bronxbomber92 8 9,339 Oct 14, 2006 09:39 PM
Last Post: szymczyk
  SDL_image + libpng + Panther = version mismatch BobbyWatson 2 6,575 Oct 23, 2005 03:55 AM
Last Post: BobbyWatson
  I Need help with SDL_image.h LidLad 8 7,447 Oct 2, 2005 05:37 PM
Last Post: LidLad