Solved Low Level Plugins
-
Good !
Then, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)
-
Hi
Sorry not cashregister. Receipt is the right one ;-) -
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
-
@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
-
As @kshegunov wrote, you didn't properly export your library's symbols. Take a look at the Creating Shared Libraries in Qt's documentation.
-
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 ClassBy 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.
-
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.
-
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
-
@ckvsoft No, just export the class
-
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
-
@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?
-
@kshegunov
The include is the quazip.pri which holds the .h and .cpp files from quazipThe output are the undefined reference to imp__
The complete output i can send you tomorrow.
Thx
-
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