Hi

Sorry to say, but I cannot get your problem.

But for using a dll, move all the dll source files to 1 project, create a pro file that creates a lib.

include the .h file in the application that you want to use the dll in.
use QLibrary to load the dll. (dynamic linking).

make sure to put Q_DECL_EXPORT when you compile as library on your class and Q_DECL_IMPORT when you include the header file in your application.

something like this:
mylibrary.pro
Qt Code:
  1. CONFIG += dll
  2. DEFINES += COMPILING_LIBRARY
  3.  
  4. #then comes your sources and headers... remember to add LIBS += mylibrary.lib in your application pro file
To copy to clipboard, switch view to plain text mode 

mylibrary.h
Qt Code:
  1. #ifdef COMPILING_LIBRARY
  2. #define MYLIBRARYEXPORT Q_DECL_EXPORT
  3. #else
  4. #define MYLIBRARYEXPORT Q_DECL_IMPORT
  5. #endif
  6.  
  7. class QFD_USB_LIB_EXPORT MyLibraryInDLL: public QWidget
  8. {
  9. Q_OBJECT
  10.  
  11. public:
  12. MyLibraryInDLL(QWidget *parent);
  13. }
To copy to clipboard, switch view to plain text mode 

myapplication.cpp
Qt Code:
  1. #include "mylibrary.h"
  2. QLibrary *loadmylibrary = new QLibrary("mylibrary", this);
  3. loadmylibrary->setLoadHints(QLibrary::ResolveAllSymbolsHint);
  4. loadmylibrary->load();
  5. if (loadmylibrary->isLoaded() == false)
  6. {
  7. // error didn't load... do something!
  8. }
To copy to clipboard, switch view to plain text mode 


cheers,
Leif