Skip to content Skip to sidebar Skip to footer

Integrating FFMPEG Using Cmake: Undefined Reference When Linking Libraries

I've been trying to cross-compile ffmpeg for different Android cpu archs for couple of days now and I have finally succeeded in the task. But now that I need to integrate these pre

Solution 1:

ffmpeg is written in C, It links different than C++ due to name mangling.

remove the set_target_properties LINKER_LANGUAGE CXX stuff

set_target_properties(avcodec PROPERTIES LINKER_LANGUAGE CXX)

and wrap the lib includes

extern "C" {
#include <libavformat/avformat.h>
#include <libavutil/dict.h>
}

Post a Comment for "Integrating FFMPEG Using Cmake: Undefined Reference When Linking Libraries"