Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Getting LNK2019 error on plugin compilation

Getting LNK2019 error on plugin compilation

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
20 Posts 4 Posters 3.3k 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.
  • D Offline
    D Offline
    deleted456
    wrote on 28 Jan 2019, 15:41 last edited by
    #9

    any update?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 28 Jan 2019, 21:28 last edited by
      #10

      Hi,

      From the looks of it, you don't export any symbol from your library. This means that, on Windows, the linker won't find them.

      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
      1
      • D Offline
        D Offline
        deleted456
        wrote on 28 Jan 2019, 22:13 last edited by deleted456
        #11

        @SGaist said in Getting LNK2019 error on plugin compilation:

        This means that, on Windows, the linker won't find them.

        Hello thanks for you answer, to be honest im quite newbie to qt and im not exactly got what you have suggested. You mean the compiler doesnt found qcadcore.lib,qcadgui.lib and qcadecmaapi.lib files in exampleplugin.pro file? And if so how can i solve it?
        Thanks a lot for your help

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 28 Jan 2019, 22:31 last edited by SGaist
          #12

          Did yes, they want to see on them.

          It's rather that they are not generated because no symbol were exported.

          [edit: Something went wrong with the answer SGaist]

          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
          • D Offline
            D Offline
            deleted456
            wrote on 28 Jan 2019, 22:40 last edited by
            #13

            Sorry what do you mean?

            I had .dll files from source code and used this method https://adrianhenke.wordpress.com/2008/12/05/create-lib-file-from-dll/ to create .lib files

            J 1 Reply Last reply 29 Jan 2019, 06:10
            0
            • D deleted456
              28 Jan 2019, 22:40

              Sorry what do you mean?

              I had .dll files from source code and used this method https://adrianhenke.wordpress.com/2008/12/05/create-lib-file-from-dll/ to create .lib files

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 29 Jan 2019, 06:10 last edited by
              #14

              @wodasdsa You should read http://doc.qt.io/qt-5/sharedlibrary.html

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • D Offline
                D Offline
                deleted456
                wrote on 30 Jan 2019, 14:54 last edited by
                #15

                i dont think the problem is in libraries i cant compile without them either..

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 30 Jan 2019, 20:57 last edited by
                  #16

                  Can you show the relevant header(s) content ?

                  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
                  • D Offline
                    D Offline
                    deleted456
                    wrote on 1 Feb 2019, 11:09 last edited by
                    #17

                    Sure,1_1549019333195_02.png 0_1549019333194_01.png
                    to see shared.pri you can check the following link,
                    https://github.com/qcad/qcad/blob/master/shared.pri

                    Thanks

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 1 Feb 2019, 20:53 last edited by
                      #18

                      You're on Windows and not exporting any symbol hence the problem. Do as @jsulm suggested and use the export macros.

                      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
                      1
                      • D Offline
                        D Offline
                        deleted456
                        wrote on 3 Feb 2019, 00:20 last edited by
                        #19

                        How can i do that? im newbie to qt and didnt understand most the terms used in that documentation..

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 3 Feb 2019, 17:46 last edited by
                          #20

                          Just follow the indications in the "Using Symbols from Shared Libraries" part.

                          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
                          1

                          18/20

                          1 Feb 2019, 20:53

                          • Login

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