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. Linking Error
Forum Updated to NodeBB v4.3 + New Features

Linking Error

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 2.0k Views 3 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.
  • yuvaramY Offline
    yuvaramY Offline
    yuvaram
    wrote on last edited by yuvaram
    #1

    Hi ,
    Could not understand the exact error.
    But the class which used is already tested. But when integrated into project faced such errors.

    FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __cdecl FrameSlider::metaObject(void)const " (?metaObject@FrameSlider@@UEBAPEBUQMetaObject@@XZ)
    FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual void * __cdecl FrameSlider::qt_metacast(char const *)" (?qt_metacast@FrameSlider@@UEAAPEAXPEBD@Z)
    FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl FrameSlider::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@FrameSlider@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
    FrameSlider.obj : error LNK2019: unresolved external symbol "public: void __cdecl FrameSlider::frameMoved(double)" (?frameMoved@FrameSlider@@QEAAXN@Z) referenced in function "public: void __cdecl FrameSlider::drawCursor(class QPainter *)" (?drawCursor@FrameSlider@@QEAAXPEAVQPainter@@@Z)
    ......\bin\debug\CoralTool.exe : fatal error LNK1120: 4 unresolved externals

    Yuvaram Aligeti
    Embedded Qt Developer
    : )

    D 1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      It could be just a path issue or cleaning up your project and rebuilding it.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

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

        Hi,

        Since you're on Windows, did you properly export your classes symbols ?

        The technique is described here.

        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
        • yuvaramY Offline
          yuvaramY Offline
          yuvaram
          wrote on last edited by
          #4

          Hi SGaist,

          There is no dependency for the class used. And its already tested in my sample code(single class). But when it is moved into my project (i mean its with multiple classes), those errors are shown.

          Yuvaram Aligeti
          Embedded Qt Developer
          : )

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

            What do you mean by move ? How exactly is your project constructed ?

            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
            • yuvaramY yuvaram

              Hi ,
              Could not understand the exact error.
              But the class which used is already tested. But when integrated into project faced such errors.

              FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __cdecl FrameSlider::metaObject(void)const " (?metaObject@FrameSlider@@UEBAPEBUQMetaObject@@XZ)
              FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual void * __cdecl FrameSlider::qt_metacast(char const *)" (?qt_metacast@FrameSlider@@UEAAPEAXPEBD@Z)
              FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl FrameSlider::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@FrameSlider@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
              FrameSlider.obj : error LNK2019: unresolved external symbol "public: void __cdecl FrameSlider::frameMoved(double)" (?frameMoved@FrameSlider@@QEAAXN@Z) referenced in function "public: void __cdecl FrameSlider::drawCursor(class QPainter *)" (?drawCursor@FrameSlider@@QEAAXPEAVQPainter@@@Z)
              ......\bin\debug\CoralTool.exe : fatal error LNK1120: 4 unresolved externals

              D Offline
              D Offline
              Defohin
              wrote on last edited by
              #6

              @yuvaram said in Linking Error:

              But when integrated into project faced such errors.

              Maybe you have to run qmake to solve that problem.

              1 Reply Last reply
              0
              • yuvaramY Offline
                yuvaramY Offline
                yuvaram
                wrote on last edited by
                #7

                @Defohin
                i have deleted build folder and made qmake. But same error while building (In Debug mode).
                But when its changed to release mode, there is no such error.

                Yuvaram Aligeti
                Embedded Qt Developer
                : )

                D 1 Reply Last reply
                0
                • yuvaramY yuvaram

                  @Defohin
                  i have deleted build folder and made qmake. But same error while building (In Debug mode).
                  But when its changed to release mode, there is no such error.

                  D Offline
                  D Offline
                  Defohin
                  wrote on last edited by
                  #8

                  @yuvaram You can always provide some code so we can see what is going on.

                  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