big4mil
25th November 2006, 08:05
Hi all,
I've created my own shared library and tried to load it dynamically while my small test app is running. Unfortunately it's not working - the lib is not loaded!
In the .pro file for my lib:
TEMPLATE = lib
CONFIG += dll
TARGET = mylib
In the header file for my lib:
#include <Qt/qglobal.h>
#ifdef TEST_LIB
# define TEST_EXPORT Q_DECL_EXPORT
#else
# define TEST_EXPORT Q_DECL_IMPORT
#endif
class TEST_EXPORT DBConnection
{
...
};
Is there somthing else what I need to do?
Then in my test app I call the lib:
QLibrary myLib("mylib");
If I check it with
myLib.isLoaded()
then I can see that the lib is not loaded.
Maybe it can't find the lib? Where I have to put my lib that its beeing loaded?
Any help would be great!!
Many thanks and best regrads
big4mil
I've created my own shared library and tried to load it dynamically while my small test app is running. Unfortunately it's not working - the lib is not loaded!
In the .pro file for my lib:
TEMPLATE = lib
CONFIG += dll
TARGET = mylib
In the header file for my lib:
#include <Qt/qglobal.h>
#ifdef TEST_LIB
# define TEST_EXPORT Q_DECL_EXPORT
#else
# define TEST_EXPORT Q_DECL_IMPORT
#endif
class TEST_EXPORT DBConnection
{
...
};
Is there somthing else what I need to do?
Then in my test app I call the lib:
QLibrary myLib("mylib");
If I check it with
myLib.isLoaded()
then I can see that the lib is not loaded.
Maybe it can't find the lib? Where I have to put my lib that its beeing loaded?
Any help would be great!!
Many thanks and best regrads
big4mil