Why can't Xcode find SDL_mixer?

Post: #1
Hi all, I'm having a lot of problems with SDL_mixer...
My project is set up as "SDL OpenGL Application", and I include the following frameworks:
Linked: Cocoa, OpenGL
Other: SDL, SDL_mixer, Foundation, AppKit
When I try to build my project Xcode says "SDL_mixer.h: No such file or directory".

I've reinstalled SDL_mixer (tried both the runtime and developer versions...I didn't trust my inexperienced self to build it from source) countless times, choosing different "Frameworks" folders because I thought it might make some difference. I made sure, though, to have only one copy of the framework on my drive at once.

The first time I tried to add SDL_mixer, when I selected it in the Groups & Files pane, it displayed only its toolbox icon, with no headers inside it. When I checked in the Finder, there was no SDL_mixer.h file, just an empty framework.

I reinstalled from the developer version, and when I looked inside the new one it had the header there. So far, so good, I thought, but when I tried building again (after cleaning the target / trashing the build folder), Xcode still couldn't find SDL_mixer.h. Tried a new project. Still no luck.

This is so aggravating. I moved my app from GLUT to SDL in about half an hour last night, but this struggle with SDL_mixer alone has consumed some seven hours now. Many thanks for any help.

Quote this message in a reply
Posts: 776
Joined: 2003.04
Post: #2
Go to my site (link below) and in the download section you'll find my (almost) entry for Vectorized. Download the one that says "Src". It uses SDL & SDL_mixer, so you can open the included Xcode project and check to see if you have anything configured different.
WARNING: I may have a lot of uneeded stuff enabled on it, just check for anything that says SDL_mixer Wink
Quote this message in a reply
Posts: 50
Joined: 2002.12
Post: #3
Try changing your linker settings to something like this.

-framework SDL_mixer -framework SDL
Quote this message in a reply
Post: #4
Thanks for your help guys.

PowerMacX- I like your game. My project is vector-based too and also missed Vectorized (doesn't matter, the point of the contest was to get people to make something and we did)

So after messing with some more settings, I finally tried changing the include from:
#include "SDL_mixer.h" to
#include "SDL_mixer/SDL_mixer.h", and this finally gave me good results. But I sure don't understand why...

Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  SDl_mixer and image bronxbomber92 3 4,432 Dec 15, 2006 12:27 PM
Last Post: bronxbomber92
  Installing SDL_image & SDL_mixer bronxbomber92 8 7,681 Oct 14, 2006 09:39 PM
Last Post: szymczyk
  Using SDL_mixer to play ogg sound (not music) effects kordova 3 8,277 Sep 1, 2006 12:29 PM
Last Post: kordova
  SDL_mixer exception at Mix_PlayMusic kordova 2 4,562 Sep 1, 2006 04:09 AM
Last Post: kordova
  SDL/SDL_mixer problems with Xcode poffy 1 4,590 Mar 7, 2006 02:45 AM
Last Post: OneSadCookie