gpt4 book ai didi

android - Qt:链接到 FFmpeg 的 android 上对 atof、log2 和 log2f 的 undefined reference

转载 作者:行者123 更新时间:2023-11-28 04:58:28 25 4
gpt4 key购买 nike

尝试为链接到 FFmpegandroid 构建我的 Qt 应用程序

我在 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'

以下是我尝试为 FFmpeg 链接的库列表。

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

我在链接器选项中遗漏了什么?

我还将以下设置为:

CONFIG += c++14
QMAKE_CXXFLAGS_RELEASE += -std=c++1y
QMAKE_CXXFLAGS_DEBUG += -std=c++1y

最佳答案

这与 Qt 严格无关,只是因为这些函数未在 Android 中定义,如 Does Android support log2 中所述。和 Android ndk can't find atof function , 在其他地方。

您要么必须在包含 FFmpeg header 之前定义这些函数,要么找到一个可以为您执行此操作的库。

关于android - Qt:链接到 FFmpeg 的 android 上对 atof、log2 和 log2f 的 undefined reference ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46651711/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com