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. Low Level Plugins
Qt 6.11 is out! See what's new in the release blog

Low Level Plugins

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 4 Posters 5.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.
  • C ckvsoft

    Sorry
    I think it was solved, but it is't
    I can compile under linux and it works. But under windows
    i got "undefined reference to `imp__...." to near all of my functions in the shared library.

    What can i missing? The library compiles and create a libcore.a file.

    My src and the plugins got "undefined reference to `imp__"

    lg Chris

    kshegunovK Offline
    kshegunovK Offline
    kshegunov
    Moderators
    wrote on last edited by
    #9

    @ckvsoft said in Low Level Plugins:

    What can i missing?

    Exports?

    https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application

    Read and abide by the Qt Code of Conduct

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

      As @kshegunov wrote, you didn't properly export your library's symbols. Take a look at the Creating Shared Libraries in Qt's documentation.

      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
      • C Offline
        C Offline
        ckvsoft
        wrote on last edited by
        #11

        Thx
        But

        //#include "mysharedlib_global.h"
        
        MYSHAREDLIB_EXPORT void foo();
        class MYSHAREDLIB_EXPORT MyClass...
        
        

        But must i export all the Functions like void foo();
        or only the Class

        By static compile, must i include the Plugon or can i load it with QPluginLoader?
        or must the plugion available at Compiletime?

        If i compile Static, must there the whole Project and Plugins are static? or can i mix it.

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

          All the functions you want to make available from your library.

          If want to go static, then you have to handle your plugins differently and they will be linked to your application.

          Exporting cleanly is the best way to go.

          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
          • C Offline
            C Offline
            ckvsoft
            wrote on last edited by
            #13

            Thx
            Also functions inside a class?
            How i can handle plugins when the Main App is static? Can i load a plugin dll well?

            LG chris

            jsulmJ 1 Reply Last reply
            0
            • C ckvsoft

              Thx
              Also functions inside a class?
              How i can handle plugins when the Main App is static? Can i load a plugin dll well?

              LG chris

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #14

              @ckvsoft No, just export the class

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

              1 Reply Last reply
              1
              • C Offline
                C Offline
                ckvsoft
                wrote on last edited by
                #15

                Thx to all
                I Export my classes but it do not work.
                I found why i got "undefined reference to `imp__...."

                When i use the Files from QUAZIP inside my Library this will not work.

                When i make a lib for QUAZIP and than i link it to my lib it will work.

                Now i do so, but have you an Idea why it to not work when i include the QUAZIP Files?

                lg Chris

                kshegunovK 1 Reply Last reply
                0
                • C ckvsoft

                  Thx to all
                  I Export my classes but it do not work.
                  I found why i got "undefined reference to `imp__...."

                  When i use the Files from QUAZIP inside my Library this will not work.

                  When i make a lib for QUAZIP and than i link it to my lib it will work.

                  Now i do so, but have you an Idea why it to not work when i include the QUAZIP Files?

                  lg Chris

                  kshegunovK Offline
                  kshegunovK Offline
                  kshegunov
                  Moderators
                  wrote on last edited by
                  #16

                  @ckvsoft said in Low Level Plugins:

                  Now i do so, but have you an Idea why it to not work when i include the QUAZIP Files?

                  What are those files you include, and what are the exact linker errors?

                  Read and abide by the Qt Code of Conduct

                  C 1 Reply Last reply
                  0
                  • kshegunovK kshegunov

                    @ckvsoft said in Low Level Plugins:

                    Now i do so, but have you an Idea why it to not work when i include the QUAZIP Files?

                    What are those files you include, and what are the exact linker errors?

                    C Offline
                    C Offline
                    ckvsoft
                    wrote on last edited by ckvsoft
                    #17

                    @kshegunov
                    The include is the quazip.pri which holds the .h and .cpp files from quazip

                    The output are the undefined reference to imp__

                    The complete output i can send you tomorrow.

                    Thx

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      ckvsoft
                      wrote on last edited by
                      #18

                      I have found the issue :) A typo in the .pro file

                      I add a .cpp file to the HEADERS and not the .h

                      Thy to all

                      1 Reply Last reply
                      2

                      • Login

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