[openal] Compiling examples on Mac OS X (SDL2 error)

Adriano Melo adriano at adrianomelo.com
Sun Dec 21 20:41:22 EST 2014

Hello guys,

I found a problem when compiling openal to Mac OS X. I was searching for
the examples and decided to compile openal from the source to get them. I
got a problem to compile some examples that were using SDL2.

/usr/bin/cc  -std=c99  -O2 -g -D_DEBUG -Wl,-search_paths_first
CMakeFiles/allatency.dir/examples/allatency.c.o  -o allatency
libex-common.a /opt/local/lib/libSDL_sound.dylib */opt/local/lib/libSDL2main.a
/opt/local/lib/libSDL2.dylib* -framework Cocoa libopenal.1.16.0.dylib
libcommon.a -framework AudioToolbox -framework ApplicationServices
-framework AudioUnit -framework CoreAudio -lpthread -ldl -lm -pthread
clang: warning: argument unused during compilation: '-pthread'
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
     (maybe you meant: _SDL_main)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see

I wrote a patch to fix this problem but now the build needs SDL and SDL2,
maybe there is a better solution for this problem. All the outputs and the
patch can be found bellow:


Adriano Melo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openal.org/pipermail/openal/attachments/20141221/e7805d14/attachment.html>

More information about the openal mailing list