1

I'm trying to compile qt ffmpeg wrapper simple encoding/decoding example under linux QTFFmpegWrapper source

# Set list of required FFmpeg libraries .pro file
LIBS += -lswresample \
    -lavcodec \
    -lavformat \
    -lavutil \
    -lswscale \
    -lz

Compiling failed due to error :-1: error: /home/mher/Qt5.4.0/5.4/gcc_64/lib/libavformat.a(avisynth.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /lib/x86_64-linux-gnu/libdl.so.2:-1: error: error adding symbols: DSO missing from command line

I found similar situation DSO missing from command line here. Should I set run settings? Or need to change .pro file?

Community
  • 1
  • 1
Mher Didaryan
  • 55
  • 3
  • 8

1 Answers1

2

Try to add the line: LIBS += -ldl in your pro file.

VP.
  • 15,509
  • 17
  • 91
  • 161
  • Nothing changed. Can compile error be caused by dynamic loader? – Mher Didaryan Jun 04 '15 at 11:08
  • Did you do `make clean; make distclean; qmake ; make` ? – VP. Jun 04 '15 at 11:09
  • No. I just do clean all, run qmake, rebuild from qt creator – Mher Didaryan Jun 04 '15 at 11:11
  • Some versions of `QtCreator` had a problem with that, that's why I am talking you what exactly you need to do. Try do to that. – VP. Jun 04 '15 at 11:13
  • After doing as You said I've got ../../QTFFmpegWrapper/QVideoEncoder.cpp:113:37: error: ‘avcodec_thread_init’ was not declared in this scope avcodec_thread_init(pCodecCtx, 10); ../../QTFFmpegWrapper/QVideoEncoder.cpp:125:42: error: ‘av_set_parameters’ was not declared in this scope if (av_set_parameters(pFormatCtx, NULL) < 0) – Mher Didaryan Jun 04 '15 at 11:35
  • @MherDidaryan [Google it](http://stackoverflow.com/questions/11024843/errors-while-installing-opencv-and-ffmpeg-through-rightscripts) – VP. Jun 04 '15 at 12:27