Hi everyone,

It is the first time I play with shared libraries and I have an issue about the signals and the slots.
I have an interface ServiceServer that defines two functions :
Qt Code:
  1. void ServiceServer::emitInitReady(bool is_error, Client* client)
  2. {
  3. qDebug() << "emit init ready";
  4. emit initReady(is_error, client);
  5. qDebug() << "emited";
  6. }
  7.  
  8. void ServiceServer::wrappedInit(bool is_error, Client* client)
  9. {
  10. qDebug() << "wrapped init";
  11. if(is_error)
  12. {
  13. qDebug() << " error";
  14. initError(client);
  15. }
  16. else
  17. {
  18. qDebug() << " ok";
  19. init(client);
  20. }
  21. reset();
  22. }
To copy to clipboard, switch view to plain text mode 
Please note that :
Qt Code:
  1. bool ok = connect(this, SIGNAL(initReady(bool, Client*)), this, SLOT(wrappedInit(bool, Client*)));
To copy to clipboard, switch view to plain text mode 
returns true.

For a "built with the application " implementation, it works and outputs :
Qt Code:
  1. init
  2. emit init ready
  3. wrapped init
  4. ok
  5. //some stuff
  6. emited
To copy to clipboard, switch view to plain text mode 
but for an implementation that is a plugin : it does not work since it outputs that :
Qt Code:
  1. init
  2. emit init ready
  3. emited
To copy to clipboard, switch view to plain text mode 
So the slot was not called.

the plugin .pro file is :
Qt Code:
  1. TEMPLATE = lib
  2. TARGET = Chat
  3. DEPENDPATH += .
  4. INCLUDEPATH += .
  5.  
  6. QT += network
  7. QT += sql
  8.  
  9. CONFIG += qt debug dll
  10.  
  11. # Input
  12. HEADERS += Chat.h \
  13. ../client/ServiceGlobal.h \
  14. ../client/ServiceClient.h \
  15. ../common/Service.h \
  16. ../client/ConfigEntry.h \
  17. ../common/WrapperHelper.h \
  18. ../common/Wrapper.h \
  19. ../common/Rights.h \
  20. ../common/WrapperManager.h \
  21. ../common/ServicesContainer.h \
  22. ../client/SingletonFactoryClient.h \
  23. ../client/WrapperManagerClient.h \
  24. ../client/Room0Client.h \
  25. ../common/Room0.h \
  26. ../server/ServiceServer.h \
  27. ../server/InWrapperServer.h \
  28. ../server/CircularBuffer.h
  29.  
  30. SOURCES += Chat.cpp \
  31. ../client/ServiceGlobal.cpp \
  32. ../client/ServiceClient.cpp \
  33. ../client/ConfigEntry.cpp \
  34. ../common/Wrapper.cpp \
  35. ../common/WrapperManager.cpp \
  36. ../client/SingletonFactoryClient.cpp \
  37. ../client/WrapperManagerClient.cpp \
  38. ../client/Room0Client.cpp \
  39. ../server/ServiceServer.cpp \
  40. ../server/InWrapperServer.cpp
To copy to clipboard, switch view to plain text mode 

I don't know if the problem has something to do with the shared library but this example make me think that yes.
Could someone explain me where am I wrong ? Maybe, it is about (un)exported symbols but I run linux and I think that those problems are windows specific.
Please ask me for more details if I am not clear enough.
Thanks