Quote Originally Posted by wysota View Post
Hmm.. I think it should be created automatically (did you remember about __declspec(dllexport)?), but if it's not the case, read this:
http://support.microsoft.com/kb/131313
the __declspec() stuff is not portable... If you use Qt you should rely on the convinience macros : Q_DECL_EXPORT and Q_DECL_IMPORT instead. The first one has to be set when building a dll and the second one when linking to a dll. They can be managed either by an include file common to all the files of the dll, typically looking like this :
Qt Code:
  1. #ifdef _X_BUILD_
  2. #if (defined(QT_DLL) || defined(QT_SHARED)) && !defined(QT_PLUGIN)
  3. // lib being compiled shared
  4. #define X_EXPORT Q_DECL_EXPORT
  5. #else
  6. // lib being embedded
  7. #define X_EXPORT
  8. #else
  9. // lib being linked against (must be shared on Window$!)
  10. #define X_EXPORT Q_DECL_IMPORT
  11. #endif
To copy to clipboard, switch view to plain text mode 
or inside the projects through the DEFINES variable. In the dll project
Qt Code:
  1. DEFINES += -DX_EXPORT=Q_DECL_EXPORT
To copy to clipboard, switch view to plain text mode 
and in the client project :
Qt Code:
  1. DEFINES += -DX_EXPORT=Q_DECL_IMPORT
To copy to clipboard, switch view to plain text mode 

Then all classes/function/variables meant to be exported (accessible when linking against the lib) have to be prefixed with X_EXPORT (or whatever the name choosen ). For instance :
Qt Code:
  1. X_EXPORT void someFunction();
  2.  
  3. class X_EXPORT someClass
  4. {
  5. public:
  6. someClass();
  7. }
To copy to clipboard, switch view to plain text mode 
Hope this helps.