iDevGames Forums
Trouble using SDL_image with XCode 3.2.3 Snow Leopard - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Trouble using SDL_image with XCode 3.2.3 Snow Leopard (/thread-8127.html)



Trouble using SDL_image with XCode 3.2.3 Snow Leopard - code4fun - Sep 22, 2010 04:15 PM

Hi!

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

Code:
/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
sdl_image

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


RE: Trouble using SDL_image with XCode 3.2.3 Snow Leopard - OneSadCookie - Sep 22, 2010 10:47 PM

You have to add SDL.framework/Headers as a header search path, or modify SDL_image.h to include the right thing.