0

Trying to build my Qt application for android linking to FFmpeg.

I get the following linker errors on android.

libavformat/hls.c:783: error: undefined reference to 'atof'
libavcodec/ffv1enc.c:476: error: undefined reference to 'log2'
libavcodec/imc.c:472: error: undefined reference to 'log2f'

Following is the list of libraries I trying to link for FFmpeg.

-lavformat -lavcodec -lswscale -lavutil -lavfilter -lswresample -lavdevice -lpostproc -lm -lgnustl_static

What am I missing in the linker options?

I have also set the following to :

CONFIG += c++14
QMAKE_CXXFLAGS_RELEASE += -std=c++1y
QMAKE_CXXFLAGS_DEBUG += -std=c++1y
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159

1 Answers1

1

This is strictly not related to Qt and happens only because those functions are not defined in Android, as discussed in Does Android support log2 and Android ndk can't find atof function, among other places.

You either have to define those functions before including FFmpeg headers or find a library that does this for you.

dragly
  • 1,445
  • 11
  • 14