[x264-devel] Bug report: x264 link fails on Mac (x86_64, Lion 10.7.4)

Tim Hewett tghewett2 at onetel.com
Wed Jul 18 15:21:13 CEST 2012


X264 build: x264-snapshot-20120717-2245

Undefined symbols encountered when building on Mac under Lion, resolved by adding MacOS frameworks to final link.

Undefined symbols:

[mybook:~/Desktop/x264-snapshot-20120717-2245] me% gcc -o x264 x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/thread.o input/lavf.o libx264.a -L. -lavformat -lpostproc -lavcodec -lswscale -lavutil -lm -lz -lbz2 -lpthread -lswscale -lavutil -m64 -lm -arch x86_64 -lpthread
Undefined symbols for architecture x86_64:
  "_kCFAllocatorDefault", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
      _ff_vda_decoder_decode in libavcodec.a(vda.o)
  "_CFDataCreate", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
      _ff_vda_decoder_decode in libavcodec.a(vda.o)
  "_kCFTypeDictionaryKeyCallBacks", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
      _ff_vda_decoder_decode in libavcodec.a(vda.o)
  "_kCFTypeDictionaryValueCallBacks", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
      _ff_vda_decoder_decode in libavcodec.a(vda.o)
  "_CFDictionaryCreateMutable", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_CFNumberCreate", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
      _ff_vda_decoder_decode in libavcodec.a(vda.o)
  "_kVDADecoderConfiguration_Height", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_CFDictionarySetValue", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_kVDADecoderConfiguration_Width", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_kVDADecoderConfiguration_SourceFormat", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_kVDADecoderConfiguration_avcCData", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_kCVPixelBufferPixelFormatTypeKey", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_kCVPixelBufferIOSurfacePropertiesKey", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_VDADecoderCreate", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
  "_CFRelease", referenced from:
      _ff_vda_create_decoder in libavcodec.a(vda.o)
      _ff_vda_decoder_decode in libavcodec.a(vda.o)
  "_CVPixelBufferGetPixelFormatType", referenced from:
      _vda_decoder_callback in libavcodec.a(vda.o)
  "_CVPixelBufferRetain", referenced from:
      _vda_decoder_callback in libavcodec.a(vda.o)
  "_CFDictionaryGetValue", referenced from:
      _vda_decoder_callback in libavcodec.a(vda.o)
  "_CFNumberGetValue", referenced from:
      _vda_decoder_callback in libavcodec.a(vda.o)
  "_VDADecoderDestroy", referenced from:
      _ff_vda_destroy_decoder in libavcodec.a(vda.o)
  "_CVPixelBufferRelease", referenced from:
      _ff_vda_destroy_decoder in libavcodec.a(vda.o)
      _ff_vda_release_vda_frame in libavcodec.a(vda.o)
  "_CFDictionaryCreate", referenced from:
      _ff_vda_decoder_decode in libavcodec.a(vda.o)
  "_VDADecoderDecode", referenced from:
      _ff_vda_decoder_decode in libavcodec.a(vda.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in libavcodec.a(vda.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status


Resolution: Add "-framework CoreFoundation -framework CoreVideo -framework VideoDecodeAcceleration" to the link command line options.

Regards,

Tim.


More information about the x264-devel mailing list