Joseph Toronto
Joseph Toronto

Reputation: 1892

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.

Upvotes: 6

Views: 1641

Answers (2)

Shebing Yang
Shebing Yang

Reputation: 66

Directly in the engineering of "TARGETS" - > "BuildSettings" - > "Other Linker Flags" click on the "+" to add a "- liconv" item, if you have any questions, welcome to leave a message

Upvotes: 0

George Y.
George Y.

Reputation: 11799

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

Upvotes: 11

Related Questions