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. [Solved]Unresolved external symbol Link error while compiling Qt program on wondows 7

[Solved]Unresolved external symbol Link error while compiling Qt program on wondows 7

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 3.6k 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.
  • M Offline
    M Offline
    mahi_0615
    wrote on last edited by
    #1

    Hi All,

    I have installed Qt 5.0.1 and Qwt 6.1 on my windows 7 based PC. I am compiling my program through Qt Creater 2.6.2. While compiling I am getting link errors related to socket functions like shutdown,recv and socket etc. I added WS2_32 library to .pro file (win32:LIBS += -lws2_32) still I am getting same error.Following are the error that i am getting while compiling.

    mainwindow.obj:-1: error: LNK2019: unresolved external symbol __imp__shutdown@8 referenced in function "public: virtual __thiscall MainWindow::~MainWindow(void)" (??1MainWindow@@UAE@XZ)
    plot.obj:-1: error: LNK2019: unresolved external symbol __imp__recv@16 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
    plot.obj:-1: error: LNK2019: unresolved external symbol __imp__bind@12 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
    plot.obj:-1: error: LNK2019: unresolved external symbol __imp__htons@4 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
    plot.obj:-1: error: LNK2019: unresolved external symbol __imp__htonl@4 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
    plot.obj:-1: error: LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
    moc_plot.obj:-1: error: LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)
    debug\navigation.exe:-1: error: LNK1120: 7 unresolved externals
    Can anyone please help me.

    Regards
    Mahendra

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      can you post the code of PLot class and you .pro file?

      Compiling error is related to missing library linked (probably wsock32)

      Regards

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

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

        Hi
        Actually this problem is solved...I was trying to install older version of qwt. but when i installed qwt 6.1 it was correctly installed...Thanks for your reply..

        Regards
        Mahendra
        [quote author="mcosta" date="1363972815"]Hi,

        can you post the code of PLot class and you .pro file?

        Compiling error is related to missing library linked (probably wsock32)

        Regards

        [/quote]

        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