首页 > 解决方案 > FFMPEG 库的 libavutil 文件未在 iOS Xcode 项目中编译

问题描述

我在我的 xcode 项目中使用了 FFMPEG 库的一些文件。当我尝试运行应用程序时,我收到以下错误:

    #if !HAVE_CBRT
static av_always_inline double cbrt(double x)
{
    return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0);
}
#endif /* HAVE_CBRT */

#if !HAVE_CBRTF
static av_always_inline float cbrtf(float x)
{
    return x < 0 ? -powf(-x, 1.0 / 3.0) : powf(x, 1.0 / 3.0);
}
#endif /* HAVE_CBRTF */

#if !HAVE_COPYSIGN
static av_always_inline double copysign(double x, double y)
{
    uint64_t vx = av_double2int(x);
    uint64_t vy = av_double2int(y);
    return av_int2double((vx & UINT64_C(0x7fffffffffffffff)) | (vy & UINT64_C(0x8000000000000000)));
}
#endif /* HAVE_COPYSIGN */

Error: Static declaration of 'cbrt' follows non-static declaration
Error: Static declaration of 'cbrtf' follows non-static declaration
Error: Static declaration of 'copysign' follows non-static declaration

我在FFMPEG的libavutil库的limb.h文件中得到这些错误。

标签: c++iosxcodeffmpeg

解决方案


推荐阅读