Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ffmpeg won't build in my project, works fine in example app

I've tried for hours but I can't figure this out. I'm using KXMOVIE in my project. I've downloaded and compiled the ffmpeg binaries as instructed. The example app actually works just fine, but I can't get it to build in my own project. All the .a files are there, exactly how it is in the example app. I'm getting this error when I try and build for the simulator.

Undefined symbols for architecture i386:
  "_iconv", referenced from:
      _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
  "_iconv_close", referenced from:
      _avcodec_open2 in libavcodec.a(utils.o)
      _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
  "_iconv_open", referenced from:
      _avcodec_open2 in libavcodec.a(utils.o)
      _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What am I doing wrong? I don't even know where to begin.

like image 290
Joseph Toronto Avatar asked Jan 18 '14 23:01

Joseph Toronto


1 Answers

You need to link also with libiconv. Assuming you have it, pass -liconv as your link option.

like image 70
George Y. Avatar answered Oct 19 '22 02:10

George Y.