[SDL] SDL_image iOS build error

回归 35328502 at qq.com
Tue Sep 23 05:45:13 PDT 2014


Hi! I build SDL_image on iOS. And build success .a lib.When I use it, it have a link error:

ld: warning: directory not found for option '-L/Users/zxl/Documents/iPhone/fall/SDL/lib'
 
Undefined symbols for architecture x86_64:
 
  "_CGImageSourceCreateImageAtIndex", referenced from:
 
      _CreateCGImageFromCGImageSource in libSDL2_image.a(IMG_ImageIO.o)
 
  "_CGImageSourceCreateWithDataProvider", referenced from:
 
      _CreateCGImageSourceFromRWops in libSDL2_image.a(IMG_ImageIO.o)
 
  "_CGImageSourceCreateWithURL", referenced from:
 
      _CreateCGImageSourceFromFile in libSDL2_image.a(IMG_ImageIO.o)
 
  "_CGImageSourceGetType", referenced from:
 
      _Internal_isType_ImageIO in libSDL2_image.a(IMG_ImageIO.o)
 
  "_UTTypeConformsTo", referenced from:
 
      _Internal_isType_ImageIO in libSDL2_image.a(IMG_ImageIO.o)
 
  "_kCGImageSourceTypeIdentifierHint", referenced from:
 
      _CreateHintDictionary in libSDL2_image.a(IMG_ImageIO.o)
 
  "_kUTTypeGIF", referenced from:
 
      _IMG_isGIF in libSDL2_image.a(IMG_ImageIO.o)
 
      _IMG_LoadGIF_RW in libSDL2_image.a(IMG_ImageIO.o)
 
  "_kUTTypeJPEG", referenced from:
 
      _IMG_isJPG in libSDL2_image.a(IMG_ImageIO.o)
 
      _IMG_LoadJPG_RW in libSDL2_image.a(IMG_ImageIO.o)
 
  "_kUTTypePNG", referenced from:
 
      _IMG_isPNG in libSDL2_image.a(IMG_ImageIO.o)
 
      _IMG_LoadPNG_RW in libSDL2_image.a(IMG_ImageIO.o)
 
  "_kUTTypeTIFF", referenced from:
 
      _IMG_isTIF in libSDL2_image.a(IMG_ImageIO.o)
 
      _IMG_LoadTIF_RW in libSDL2_image.a(IMG_ImageIO.o)
 
ld: symbol(s) not found for architecture x86_64
 
clang: error: linker command failed with exit code 1 (use -v to see invocation)‍




I didn't know how to fix it. I use lipo -info it have all architectures armv7 i386 x86_64 arm64.




Anyone can help me? I also found someone also have this problem in the mail list. He seems not resolve it. ‍
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140923/8d6337f6/attachment-0001.htm>


More information about the SDL mailing list