SDL_mixer problem in XCode

Posts: 13
Joined: 2006.11
Post: #1
I've been trying to compile this DaveGnukem 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.
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
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.
Quote this message in a reply
Posts: 13
Joined: 2006.11
Post: #3
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.
Quote this message in a reply
Posts: 21
Joined: 2006.11
Post: #4
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  xcode build problem NelsonMandella 7 8,360 Apr 13, 2009 12:21 PM
Last Post: szymczyk
  sdl_ttf and sdl_mixer question Najdorf 3 4,032 Oct 20, 2008 02:38 PM
Last Post: Najdorf
  Newbie problem XCode Include files BBBert 1 5,705 Mar 17, 2008 03:46 PM
Last Post: OneSadCookie
  Get sound intensity with SDL_mixer Hazelden 0 3,128 Sep 7, 2007 03:51 PM
Last Post: Hazelden
  'Undefined Symbols' problem with Xcode 2.3. Any ideas, please!! scratt 6 8,044 Jun 11, 2006 10:19 AM
Last Post: scratt