We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1988

Summary: iOS project file brings other dependencies
Product: SDL_mixer Reporter: Vittorio Giovara <vitto.giova>
Component: miscAssignee: Sam Lantinga <slouken>
Status: ASSIGNED --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: iOS 4   
Attachments: remove MODPLUG_MUSIC from ios project file

Description Vittorio Giovara 2013-07-25 16:41:59 UTC
Created attachment 1254 [details]
remove MODPLUG_MUSIC from ios project file

I've compiled stock SDL_mixer project file and compiled every source fine.
However when I link the resulting library, I get a lot of undefined symbols from modplug dep:


Undefined symbols:
  "operator new[](unsigned long)", referenced from:
      CSoundFile::AllocatePattern(unsigned int, unsigned int)in libSDL2_mixer.a(sndfile.o)
[cut]
      AMSUnpack(char const*, unsigned int, char*, unsigned int, char)in libSDL2_mixer.a(load_ams.o)
  "operator delete(void*)", referenced from:
      _ModPlug_Unload in libSDL2_mixer.a(modplug.o)
      _ModPlug_Load in libSDL2_mixer.a(modplug.o)
      _ModPlug_Load in libSDL2_mixer.a(modplug.o)
      CSoundFile::Destroy()      in libSDL2_mixer.a(sndfile.o)
  "___gxx_personality_v0", referenced from:
      ___gxx_personality_v0$non_lazy_ptr in libSDL2_mixer.a(modplug.o)
[cut]
     (maybe you meant: ___gxx_personality_v0$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status


Removing MODPLUG_MUSIC macro lets SDL_mixer be built and linked fine.
Attached the patch for this, but not sure if it's the intended fix.
Comment 1 Sam Lantinga 2013-07-27 04:23:47 UTC
That's a good point, it looks like the modplug code is C++.
I'd like to avoid completely removing it from SDL_mixer for iOS.
I'm leaving this open for now.