Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error LNK2019: unresolved external symbol with Phonon
Qt 6.11 is out! See what's new in the release blog

Error LNK2019: unresolved external symbol with Phonon

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 2 Posters 7.0k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    morpe
    wrote on last edited by
    #1

    Hi,

    I tried integrating phonon music player with an existing application which compiles well before the integration. I'm using VS 2010 and Qt 4.8.2 VS-addin. The error below occurred after integrating phonon music player and I have searched online but can't find any solution to this problem.
    @12>MainWindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Phonon::Path::~Path(void)" (_imp??1Path@Phonon@@QAE@XZ) referenced in function "public: __thiscall MainWindow::MainWindow(class QString const &,class QWidget *,class QFlags<enum Qt::WindowType>)" (??0MainWindow@@QAE@ABVQString@@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)
    12>MainWindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class Phonon::Path __cdecl Phonon::createPath(class Phonon::MediaNode *,class Phonon::MediaNode *)" (_imp?createPath@Phonon@@YA?AVPath@1@PAVMediaNode@1@0@Z) referenced in function "public: __thiscall MainWindow::MainWindow(class QString const &,class QWidget *,class QFlags<enum Qt::WindowType>)" (??0MainWindow@@QAE@ABVQString@@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)
    12>MainWindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Phonon::MediaObject::setTickInterval(int)" (_imp?setTickInterval@MediaObject@Phonon@@QAEXH@Z) referenced in function "public: __thiscall MainWindow::MainWindow(class QString const &,class QWidget *,class QFlags<enum Qt::WindowType>)" (??0MainWindow@@QAE@ABVQString@@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)
    12>MainWindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Phonon::MediaObject::MediaObject(class QObject *)" (_imp??0MediaObject@Phonon@@QAE@PAVQObject@@@Z) referenced in function "public: __thiscall MainWindow::MainWindow(class QString const &,class QWidget *,class QFlags<enum Qt::WindowType>)" (??0MainWindow@@QAE@ABVQString@@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)

    ....
    12>F:\Projects\build_0.02_audio\bin\Debug\Rsh.exe : fatal error LNK1120: 37 unresolved externals
    @

    I came across the link below which mentioned "Qt Project Settings" but the problem with this is, my "Qt Project Settings" is not selectable in current project. Its only selectable if there is .pro file but my project don't have a .pro file
    "Your text to link here...":http://qt-project.org/forums/viewthread/14771

    Thanks in advance for your help.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      guziemic
      wrote on last edited by
      #2

      Hi,

      Then if you do not use .pro file, you should have Makefile which is used during build process. Probably in LIBDIRS and LIBS you are missing path and library of Phonon.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        morpe
        wrote on last edited by
        #3

        Hi guziemic,
        Thanks for your reply. I'm new to Qt and the project have Cmakefile and it does contain a line with phonon as follow:

        @set( QT_LIBS QtCore QtGui QtNetwork QtSvg QtWebKit QtXml QtXmlPatterns phonon )@

        Please, can you elaborate on what you mean by LIBDIRS and LIBS.

        Thanks

        1 Reply Last reply
        0
        • G Offline
          G Offline
          guziemic
          wrote on last edited by
          #4

          Actually, I am using Linux and Eclipse with Qt plugin. So, I can suggest you where problem can be located. Anyway, if you have phonon there it is OK.

          @
          #specify place -L<place> and name of library -l<name> to link our code against
          LIBS = -L/usr/lib -lphonon
          @

          and there is also specification of include path, but this you have correct as the compilation finish with success.
          @
          INCPATH = -I/usr/include/phonon
          @

          In your case you should look for libraries in place where you have install Qt. Do you have there phonon DLL?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            morpe
            wrote on last edited by
            #5

            I'm using windows 7 32bit and phonon dll is located at C:\Qt\4.8.2\lib. If the cmake setting is suffient, how do I solve this problem then?

            1 Reply Last reply
            0
            • G Offline
              G Offline
              guziemic
              wrote on last edited by
              #6

              During build from CMake VS should generate makefile that is used later on during compilation. Do you have any makefile next to CMake or in build directory? Is in this makefile information about phonon?

              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