The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Building SDL2 & Peripheral Libraries on OS X El Capitan
cenu00


Joined: 15 Jan 2016
Posts: 2
SDL2 Build Report:
Build successful. Installed in /usr/local

Comments & Concerns: SDL2 is using an Apple audio compositor from the outdated Carbon interface.
Code:
WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

Perhaps additions should be made for compatibility with future releases of OS X, & further compatibility with versions >= 10.7, but all in due time, I suppose.

SDL2_gfx Build Report:
Build successful. Installed in /usr/local

SDL2_image Build Report:
Build successful. Installed in /usr/local

SDL2_mixer Build Report:
Build successful.* Installed in /usr/local

*MOD support via libmikmod

Comments & Concerns: SDL2_mixer's configuration script reported libmodplug missing, despite it having been installed in /usr/local along with other libraries including libFLAC, libogg, libvorbis, and smpeg2. I suspect this is because, unlike the others, libmodplug lacked an object file with the extension ".a".
Perhaps searching through extensions, ".la" or ".dylib" would help correct this issue. But who knows, maybe the existence of libmodplug.a is required, in which case it can't be helped.

Addendum: On a somewhat related note, libvorbis apparently searches for libogg in /opt/local (or perhaps that's just the configuration of my workstation), yet installs in /usr/local along with all the others. If libvorbis' configuration script reports libogg missing, despite it being installed, I recommend copying installed libogg files into /opt/local to proceed with installing libvorbis. If this fails, the installation and activation of libogg through MacPorts may be necessary.

SDL2_net Build Report:
Build successful. Installed in /usr/local

SDL2_ttf Build Report:
Build Successful. Installed in /usr/local

Please note these steps before attempting to build SDL2*:

1. Install Xcode or Command Line Tools for Xcode (10.11)

2. Download the source code archives for SDL2* and all dependencies (Notably the dependencies for SDL2_mixer for format support: libogg, libvorbis, libFLAC, limodplug/libmikmod, and libsmpeg2).

3. In the terminal, go to each of their respective directories (dependencies first), then type
Code:
./configure


3a. Assuming SDL2_mixer still fails to find libmodplug, install libmikmod using these steps and type
Code:
./configure --enable-music-mod-mikmod


4. type
Code:
make
and
Code:
sudo make install


4a. repeat steps 2-4 until you have installed all of the libraries you need.

I hope some OS X El Capitan users find this useful for SDL2 programming without necessitating the use of Xcode, or the Frameworks provided.
Dominus


Joined: 13 Oct 2009
Posts: 127
to get rid of the Carbon interface deprecation warning, see https://bugzilla.libsdl.org/show_bug.cgi?id=3127