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 3088

Summary: undefined reference to 'Mix_EachSoundFont'
Product: SDL_mixer Reporter: Amit Jain <amit.jain83>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: amit.jain83, sezeroz
Version: 2.0.0   
Hardware: x86   
OS: Linux   
Attachments: Attach patch resolve this linking error by placing #ifdef MID_MUSIC in correct place.

Description Amit Jain 2015-08-11 03:51:17 UTC
Defect can be reproducible on Windows & linux as well.

When SDL_mixer is build using --disable-music-midi option and user calls “Mix_EachSoundFont” method, following error will be displayed.

 /tmp/cc7zRrPb.o: In function `main':
 test.c:(.text+0x1a): undefined reference to `Mix_EachSoundFont'
 collect2: ld returned 1 exit status
Comment 1 Amit Jain 2015-08-11 03:54:22 UTC
Created attachment 2237 [details]
Attach patch resolve this linking error by placing #ifdef MID_MUSIC in correct place.

Patch directly can be used to resolve this linking error.

Please review.
Comment 2 Sam Lantinga 2017-10-13 05:35:30 UTC
Mix_EachSoundFont() isn't a public API, so if fluidsynth isn't compiled into SDL_mixer, that function shouldn't exist.

Is there a use case for officially exposing that function?
Comment 3 Sam Lantinga 2017-10-14 08:44:46 UTC
Actually you're right, these are public APIs.
Comment 4 Sam Lantinga 2017-10-14 08:50:55 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL_mixer/rev/1e215d1f9492