I just installed the 2 Mac OS X packages (SDL-1.2.7.pkg.tar.gz and
SDL-devel-1.2.7.pkg.tar.gz) and need help getting my little app
(which uses SDL) to build. It’s just a little main.cpp plus a makefile
and it makes use of OpenGL.
I figured it should just be as simple as installing those two
Mac OS X double-clickable packages, then putting a "-framework SDL"
into my makefile, but it’s not working.
The #includes in my source file look like this:
#include
#include
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <SDL.h>
#include <SDL_video.h>
and the relevant portions of my makefile look like this:
LDFLAGS = -Wall -framework OpenGL -framework SDL -framework Foundation
CPP_FLAGS = -g -c
g++ $(CPP_FLAGS) main.cpp
g++ -o $@ $(LDFLAGS) main.o
The errors I’m getting look like this:
[john ~/dev_cpp/SDL/sdl_gl_test]$ make
g++ -g -c main.cpp
main.cpp:15:17: SDL.h: No such file or directory
main.cpp:16:23: SDL_video.h: No such file or directory
I tried changing the #includes to “SDL/SDL.h” and "SDL/SDL_video.h"
but got the same errors.
As as side note, I see that the SDL package installed stuff into
/Library/Frameworks and the SDL-devel package installed stuff into
~/Library/Frameworks. It looks to me as if installing both packages
was redundant for me, since the two Mach-O dynamically linked libs
(the one in /Library/… and the one in ~/Library/…) seem to be
identical. Should I remove the one installed by the SDL package?
If so, do I just go into /Library/… and delete it, or is there
some sort of uninstall I’m supposed to do?
Thanks,
—J