在OS X 10.7上构建SDL2:“ranlib:file:...没有符号”

时间:2012-05-17 06:31:30

标签: macos makefile sdl

在狮子身上构建SDL2时,我在运行makefile时会遇到以下情况:

/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_audiodev.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_yuv_mmx.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_render_d3d.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_libgl2D.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_ndsrender.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_render_gles.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_render_gles2.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_shaders_gles2.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_getenv.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_malloc.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_qsort.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_stdlib.o) has no symbols
/usr/bin/ranlib: file: build/.libs/libSDL2.a(SDL_x11opengles.o) has no symbols
libtool: link: ranlib build/.libs/libSDL2.a
ranlib: file: build/.libs/libSDL2.a(SDL_audiodev.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_yuv_mmx.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_render_d3d.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_libgl2D.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_ndsrender.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_render_gles.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_render_gles2.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_shaders_gles2.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_getenv.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_malloc.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_qsort.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_stdlib.o) has no symbols
ranlib: file: build/.libs/libSDL2.a(SDL_x11opengles.o) has no symbols

我不知道这是否与此有关,但之前我不得不do this fix停止抱怨SDL_x11sym.h:106:1

1 个答案:

答案 0 :(得分:4)

好的,这就是我的所作所为:

  1. 在终端中运行$ ./autogen.sh

  2. 在Xcode中打开./Xcode/SDL/SDL.xcodeproj

  3. 运行Framework目标:

    SDL2 framework target

  4. 在finder中打开生成的框架:

    open the framework in the finder

  5. SDL2.framework复制到/Library/Frameworks/

    copy the framework

  6. woot