Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. can't link ffmpeg 2.7 dev lib and Include folder inside Qt Development
QtWS25 Last Chance

can't link ffmpeg 2.7 dev lib and Include folder inside Qt Development

Scheduled Pinned Locked Moved General and Desktop
librariesliblibc++licencelink
11 Posts 2 Posters 5.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Atdhe
    wrote on last edited by Atdhe
    #1

    !URGENT
    My pro.file code

    #-------------------------------------------------

    Project created by QtCreator 2014-02-25T13:01:38

    #-------------------------------------------------

    QT += core gui webkitwidgets multimediawidgets svg

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET =
    TEMPLATE = app

    images.path = $$OUT_PWD
    images.files += resources/cutscenes/*.mp4
    INSTALLS += images

    ICON = resources/osx_icon.icns
    RC_FILE = .rc

    win32:LIBS += C:/ffmpeg/lib -lavformat -lavutil -lavcodec -lavdevice -lswscale -lswresample
    win32:INCLUDEPATH += "C:/ffmpeg/include"

    DEFINES += __STDC_CONSTANT_MACROS
    DEFINES += __STDC_FORMAT_MACROS

    TRANSLATIONS += languages/whatchado_diy.de.ts
    languages/whatchado_diy.en.ts

    !isEmpty(TRANSLATIONS) {

    isEmpty(QMAKE_LRELEASE) {
    win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
    else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
    }

    isEmpty(TS_DIR):TS_DIR = Translations

    TSQM.name = lrelease ${QMAKE_FILE_IN}
    TSQM.input = TRANSLATIONS
    TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
    TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
    TSQM.CONFIG = no_link
    QMAKE_EXTRA_COMPILERS += TSQM
    QMAKE_CFLAGS = -Wno-unused-parameter
    QMAKE_CFLAGS = -Wno-unused-variable
    #QMAKE_CXXFLAGS_WARN_OFF = -Wunused-variable
    #QMAKE_CXXFLAGS_WARN_OFF = -Wunused-parameter
    PRE_TARGETDEPS += compiler_TSQM_make_all
    } else:message(No translation files in project)

    SOURCES += main.cpp
    mainwindow.cpp
    settingsdialog.cpp
    interviews.cpp
    listdelegate.cpp
    helphelp.cpp
    helpbp.cpp
    uploaddialog.cpp
    previewdialog.cpp
    qtx/qxtspanslider.cpp
    qtx/qxtglobal.cpp
    questions.cpp
    addinterview.cpp
    startview.cpp
    logindialog.cpp
    videopreview.cpp
    videothread.cpp
    videoencode.cpp
    video_image.cpp
    videoencodethread.cpp
    videoplaythread.cpp
    audiobuffer.cpp
    videobuffer.cpp
    videoview.cpp
    videodecodethread.cpp
    uploadthread.cpp
    uploadprogressdialog.cpp
    aboutdialog.cpp
    welcome.cpp

    HEADERS += mainwindow.h
    settingsdialog.h
    interviews.h
    listdelegate.h
    helphelp.h
    helpbp.h
    uploaddialog.h
    previewdialog.h
    qtx/qxtspanslider_p.h
    qtx/qxtspanslider.h
    qtx/qxtglobal.h
    questions.h
    addinterview.h
    startview.h
    logindialog.h
    videopreview.h
    videothread.h
    videoencode.h
    config.h
    video_image.h
    videoencodethread.h
    videoplaythread.h
    audiobuffer.h
    videobuffer.h
    videoview.h
    videodecodethread.h
    log.h
    uploadthread.h
    uploadprogressdialog.h
    aboutdialog.h
    welcome.h

    FORMS += mainwindow.ui
    settingsdialog.ui
    helphelp.ui
    helpbp.ui
    uploaddialog.ui
    previewdialog.ui
    mainwindow_test.ui
    addinterview.ui
    startview.ui
    logindialog.ui
    uploadprogressdialog.ui
    aboutdialog.ui
    welcome.ui

    RESOURCES +=
    resources.qrc

    OTHER_FILES +=
    whatchado_diy.rc

    =====Isuse============
    cannot find C:/ffmpeg/lib: Permission denied
    cannot find -lavformat
    cannot find -lavutil
    cannot find -lavcodec
    cannot find -lavdevice
    cannot find -lswscale
    cannot find -lswresample

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You're missing a -L before C:/ffmpeg/lib so it should be -LC:/ffmpeg/lib

      Please note that this forum is community driven and people here are glad to help you sort your problem, but even if you're in a hurry adding !!!URGENGTTTTTTTTTTTTTTT just like that can be considered rude.

      If you need urgent and immediate help, you might also consider hiring professional people through e.g. the Qt Company, KDAB, ICS etc.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Atdhe
        wrote on last edited by
        #3

        its still got the errors when i add -L befor than i got a bunch off
        C:\Users\atdhe\Documents\storyrecorder\videopreview.cpp:10: error: undefined reference to av_register_all' C:\Users\atdhe\Documents\storyrecorder\videopreview.cpp:80: error: undefined reference to avformat_open_input'
        C:\Users\atdhe\Documents\storyrecorder\videopreview.cpp:116: error: undefined reference to avcodec_open2' C:\Users\atdhe\Documents\storyrecorder\videopreview.cpp:126: error: undefined reference to avcodec_alloc_frame'
        .
        .
        .
        .
        .
        .

        and so on......

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Do you still have the permission error ? Or is it just the symbol missing error ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Atdhe
            wrote on last edited by
            #5

            only the C:\Users\atdhe\Documents\storyrecorder\videopreview.cpp:80: error: undefined reference
            ... and so on.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What compiler are you using for your project ? Which one was used to build ffmpeg ? Is your project 32 or 64 bit ? What about ffmpeg ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Atdhe
                wrote on last edited by
                #7

                Compiler->C:\Qt\Tools\mingw492_32\bin\g++.exe
                ffmpeg->ffmpeg-2.7-win64-dev
                and i am runnig in Windows 8.1 64 bit

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  So you are trying to link a 64bit ffmpeg to a 32bit application. That won't work.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  A 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    So you are trying to link a 64bit ffmpeg to a 32bit application. That won't work.

                    A Offline
                    A Offline
                    Atdhe
                    wrote on last edited by
                    #9

                    Thank you i found the solution i needed to copy .dll ffmpeg to my .exe folder.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      And what did you do to solve the compilation error ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      A 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        And what did you do to solve the compilation error ?

                        A Offline
                        A Offline
                        Atdhe
                        wrote on last edited by
                        #11

                        Solved -> i adde the avcodec_56.dll and other ffmpeg .dll to my .exe folder and that worked.
                        Thanks a lot for help.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved