【问题标题】:using ffmpeg with xcode [duplicate]将ffmpeg与xcode一起使用[重复]
【发布时间】:2012-04-03 12:11:29
【问题描述】:

可能重复:
problem compiling ffmpeg for iFrameExtractor

我已经在 Mac 的终端中成功运行了 FFMPEG,但是我在使用 Xcode 时遇到了问题。我使用了 iFrameExtractor 但我发现了这些错误:

ld: warning: ignoring file /Users/training/Desktop/iFrameExtractor/ffmpeg/lib/libavformat.a, file was built for archive which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/training/Desktop/iFrameExtractor/ffmpeg/lib/libavcodec.a, file was built for archive which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/training/Desktop/iFrameExtractor/ffmpeg/lib/libavdevice.a, file was built for archive which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/training/Desktop/iFrameExtractor/ffmpeg/lib/libavutil.a, file was built for archive which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/training/Desktop/iFrameExtractor/ffmpeg/lib/libswscale.a, file was built for archive which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
  "_av_register_all", referenced from:
      -[VideoFrameExtractor initWithVideo:] in VideoFrameExtractor.o
  "_av_open_input_file", referenced from:
      -[VideoFrameExtractor initWithVideo:] in VideoFrameExtractor.o
  "_av_find_stream_info", referenced from:
      -[VideoFrameExtractor initWithVideo:] in VideoFrameExtractor.o
  "_avcodec_find_decoder", referenced from:
      -[VideoFrameExtractor initWithVideo:] in VideoFrameExtractor.o
  "_avcodec_open", referenced from:
      -[VideoFrameExtractor initWithVideo:] in VideoFrameExtractor.o
  "_avcodec_alloc_frame", referenced from:
      -[VideoFrameExtractor initWithVideo:] in VideoFrameExtractor.o
  "_avpicture_free", referenced from:
      -[VideoFrameExtractor setupScaler] in VideoFrameExtractor.o
      -[VideoFrameExtractor dealloc] in VideoFrameExtractor.o
  "_sws_freeContext", referenced from:
      -[VideoFrameExtractor setupScaler] in VideoFrameExtractor.o
      -[VideoFrameExtractor dealloc] in VideoFrameExtractor.o
  "_avpicture_alloc", referenced from:
      -[VideoFrameExtractor setupScaler] in VideoFrameExtractor.o
  "_sws_getContext", referenced from:
      -[VideoFrameExtractor setupScaler] in VideoFrameExtractor.o
  "_avformat_seek_file", referenced from:
      -[VideoFrameExtractor seekTime:] in VideoFrameExtractor.o
  "_avcodec_flush_buffers", referenced from:
      -[VideoFrameExtractor seekTime:] in VideoFrameExtractor.o
  "_av_free", referenced from:
      -[VideoFrameExtractor dealloc] in VideoFrameExtractor.o
  "_avcodec_close", referenced from:
      -[VideoFrameExtractor dealloc] in VideoFrameExtractor.o
  "_av_close_input_file", referenced from:
      -[VideoFrameExtractor dealloc] in VideoFrameExtractor.o
  "_av_read_frame", referenced from:
      -[VideoFrameExtractor stepFrame] in VideoFrameExtractor.o
  "_avcodec_decode_video2", referenced from:
      -[VideoFrameExtractor stepFrame] in VideoFrameExtractor.o
  "_av_free_packet", referenced from:
      -[VideoFrameExtractor stepFrame] in VideoFrameExtractor.o
  "_sws_scale", referenced from:
      -[VideoFrameExtractor convertFrameToRGB] in VideoFrameExtractor.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

【问题讨论】:

    标签: iphone


    【解决方案1】:

    由于 iPhone 应用程序是针对 ARM 架构的,因此您必须为 ARM 重新编译 ffmpeg 库。

    您应该在配置 ffmpeg 构建时使用 --arch=arm 选项。

    【讨论】:

    • 我该怎么做,请告诉我整个过程。我使用的是 xcode4.2.1 & mac 10.7.2...
    猜你喜欢
    • 2012-03-25
    • 1970-01-01
    • 2019-02-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-10
    相关资源
    最近更新 更多