Trouble using SDL_image with XCode 3.2.3 Snow Leopard

Posts: 1
Joined: 2010.09
Post: #1

I am currently working through the nehe tutorials and i'd like to learn how to handle textures. I stumbled over sdl_image for loading jpegs.

My problem is after installing both sdl and sdl_image framework and adding them to my xcode project building still complains

/Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:28:0 /Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:28:17: error: SDL.h: No such file or directory

In my source file i had to use
#include <SDL_image/SDL_image.h>
instead of
#include "SDL_image.h"
for the header to be found.

But as the error message above points out the referenze to SDL.h in the form of
#include "SDL.h"
is in the SDL_image.h included in the framework I downloaded here

Even changig it to
#include <SDL/SDL.h>
in the SDL_image.h doesn't make a difference.

So how can i get it working? I tried trial error with the header, framework and resource paths in the project settings. No luck there. I am new to XCode and used to Java. C and Cpp search path setup and linking always gives me a slight headache until i have all includes in the ide up and running and can get down to the code i want to write.

I appreciate any hint you can give Smile
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
You have to add SDL.framework/Headers as a header search path, or modify SDL_image.h to include the right thing.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  SDL_image and bmp loading Duane 13 14,045 Dec 21, 2009 09:14 AM
Last Post: Skorche
  Collada Support in Snow Leopard? AnotherJake 25 20,160 Jun 14, 2009 09:36 AM
Last Post: AnotherJake
  Snow Leopard and OpenCL TythosEternal 4 6,625 Jun 12, 2009 08:05 AM
Last Post: AnotherJake
  Installing SDL_image &amp; SDL_mixer bronxbomber92 8 9,789 Oct 14, 2006 09:39 PM
Last Post: szymczyk
  SDL_image + libpng + Panther = version mismatch BobbyWatson 2 6,780 Oct 23, 2005 03:55 AM
Last Post: BobbyWatson