qt compile mac os undefined symbols AVFMediaPlayer

2019-08-19 00:10发布

Im trying to compile Qt 5.9.x on my Mac OS High Sierra computer.

I configure with the following options:

./configure --prefix=/Users/myuserid/opt/qt593 \
    -opensource  \
    -release -gui -widgets -no-opengl -confirm-license \
    -shared -no-dbus -nomake examples

After configuring I compile and after a while it stops with the following undefined symbols:

Undefined symbols for architecture x86_64:
  "AVFVideoRendererControl::staticMetaObject", referenced from:
      AVFMediaPlayerService::releaseControl(QMediaControl*) in avfmediaplayerservice.o
  "AVFVideoRendererControl::AVFVideoRendererControl(QObject*)", referenced from:
      AVFMediaPlayerService::requestControl(char const*) in avfmediaplayerservice.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [../../../../plugins/mediaservice/libqavfmediaplayer.dylib] Error 1
make[4]: *** [sub-mediaplayer-make_first] Error 2
make[3]: *** [sub-avfoundation-make_first] Error 2
make[2]: *** [sub-plugins-make_first] Error 2
make[1]: *** [sub-src-make_first] Error 2
make: *** [module-qtmultimedia-make_first] Error 2

How do I fix or get past this error? I haven't seen an AVMediaPlayer package to download for Mac OS? I really don't need it anyhow since Im not planning on doing any Sound or Video?

Anyone see this error and know how to fix it? Thanks

1条回答
贪生不怕死
2楼-- · 2019-08-19 00:45

I'm currently compiling Qt 5.9.3 on osx. I get the same error when I use the '--no-opengl' switch, without it, the compilation is successful. I don't know if this is an option for you, though.

查看更多
登录 后发表回答