I am trying to use Qwt in one of my Qt DLLs.
The thing is that the library does not load if I call a constructor of QwtPlot inside. If I comment it out it loads. Just to note that DLL builds successfully when QwtPlot is uncommented.
I am using Visual Studio 2010.
Any thoughts?
EDIT (code that loads the dll, though the code works just fine for the dll which does not have QWT inside):
typedef bool (*EntryPointPtr)();
HINSTANCE _pDLL;
EntryPointPtr _pFn;
_pDLL = ::LoadLibrary("..\\MyDll.dll");
_pFn = (EntryPointPtr) ::GetProcAddress(_pDLL, "qtLoader");
_pFn();