0

私の現在のプロジェクトでは、同じプロジェクトで live555 と ffmpeg ライブラリの両方を使用する必要があります。問題なく両方のプロジェクトのサンプルをビルドして実行できますが、両方のプロジェクトをプロジェクトにマージすると、次のコンパイラ エラーが発生しました。

Undefined symbols for architecture armv7:
  "av_free_packet(AVPacket*)", referenced from:
      -[MyRtspClient readFFmpegAudioFrameAndDecode] in MyRtspClient.o
  "av_read_frame(AVFormatContext*, AVPacket*)", referenced from:
      -[MyRtspClient readFFmpegAudioFrameAndDecode] in MyRtspClient.o
  "av_strerror(int, char*, unsigned long)", referenced from:
      -[MyRtspClient readFFmpegAudioFrameAndDecode] in MyRtspClient.o
  "av_dict_set(AVDictionary**, char const*, char const*, int)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "av_init_packet(AVPacket*)", referenced from:
      -[MyRtspClient readFFmpegAudioFrameAndDecode] in MyRtspClient.o
  "avcodec_register_all()", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "av_register_all()", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "av_log_set_level(int)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "av_log(void*, int, char const*, ...)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "avformat_alloc_context()", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "avformat_network_deinit()", referenced from:
      -[MyRtspClient destroyFFmpegAudioStream] in MyRtspClient.o
  "avformat_open_input(AVFormatContext**, char const*, AVInputFormat*, AVDictionary**)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "avformat_find_stream_info(AVFormatContext*, AVDictionary**)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "av_find_best_stream(AVFormatContext*, AVMediaType, int, int, AVCodec**, int)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "av_dump_format(AVFormatContext*, int, char const*, int)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "avcodec_open2(AVCodecContext*, AVCodec const*, AVDictionary**)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "avformat_network_init()", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "av_dict_free(AVDictionary**)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
  "avcodec_find_decoder(AVCodecID)", referenced from:
      -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

必要なファイルをすべて含めるべきだったので、これには少し唖然としました。どんな提案でも大歓迎です。ありがとう。

4

1 に答える 1

0

はい、それらをうまく組み合わせることができます。最良の方法は、ffmpeg と live555 ライブラリをマージしてワークスペースを作成することです。

これが例です。ここに画像の説明を入力

于 2014-01-24T17:06:56.747 に答える