PDA

View Full Version : SDL_mixer problem in XCode


mt_maui
2006.11.13, 06:44 PM
I've been trying to compile this DaveGnukem (http://gnukem.sourceforge.net/) game in XCode, and keep running into linking errors. The program is written in C++ and SDL. Here's my steps thus far:

1. Create SDL application in XCode

2. Add source files to target

3. Edit source files to compile correctly (didn't take much, mostly just #includes were different)

The files all compile now, but during linking I got:

Undefined symbols: _Mix_FreeChunk _Mix_LoadWAV _Mix_OpenAudio _Mix_PlayChannelTimed

I assumed the "mix" prefix meant it was referring to SDL_mixer. When I added SDL_mixer under linked frameworks the error changed to just:

Undefined symbols:

Which really leaves me at a dead end. Anybody know what steps I've missed here? I downloaded the latest version of SDL_mixer.

OneSadCookie
2006.11.13, 06:47 PM
You'll need to look at the detailed build log to find out which symbols are undefined. Click the little button below the errors and warnings that looks like 2 or 3 lines of text.

mt_maui
2006.11.13, 06:52 PM
Aha! Thanks, I didn't know about that. Looks like the current problems actually isn't related to SDL_mixer.

Thanks for the quick reply.

savage
2006.11.14, 01:37 PM
From my limited experience with XCode and SDL, when you have errors that begin with underscore ie. _MIX... etc It means you need to include the associated header file as well.

I hope this helps.