Hi all,
I made a DLL which worked fine until I integrated some Qt stuff.
Now, it compiles fine, but some methods are not found inside the DLL, namely those which use Qt (e.g. have a QList as return value).
I read a bit about exporting Qt in a DLL but don't find my error.
I use
qmake -project -t vclib
qmake -tp vc
to generate a vc2005 project and then compile.
Further, I use
#ifdef HD2COMM_EXPORTS
#define HD2COMM_API Q_DECL_EXPORT //__declspec(dllexport)
#define EXPIMP_TEMPLATE
#else
#define HD2COMM_API Q_DECL_IMPORT //__declspec(dllimport)
#ifdef HD2COMM_EXPORTS
#define HD2COMM_API Q_DECL_EXPORT //__declspec(dllexport)
#define EXPIMP_TEMPLATE
#else
#define HD2COMM_API Q_DECL_IMPORT //__declspec(dllimport)
To copy to clipboard, switch view to plain text mode
with HD2COMM_EXPORTS defined
in my header file.
Preprocessor definitions are
_WINDOWS,UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_DLL ,QT_GUI_LIB,QT_CORE_LIB,QT_THREAD_SUPPORT
When I look at the DLL with the dependency walker, I find that e.g. these functions
class QList<class CHD2Input *> CRoutingManager::GetListInputs(void)
class QList<class CHD2Output *> CRoutingManager::GetListOutputs(void)
class QList<class CHD2Input *> CRoutingManager::GetListInputs(void)
class QList<class CHD2Output *> CRoutingManager::GetListOutputs(void)
To copy to clipboard, switch view to plain text mode
are not available whereas others are. However, I don't get any link error.
But when I start the application which uses the DLL, I get a message, that a function is not found in the DLL.
Any help is appreciated.
Thanks in advance,
Rainer
Bookmarks