Reputation: 119
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();
Upvotes: 0
Views: 1661
Reputation: 119
Problem solved and here is the solution for anyone who might encounter the same problem again.
Initially I set up the project settings as follows:
What needed to be done is:
Seems like Visual Studio could not link it properly using the initial option.
PS. Thanks for helping. Your answers guided me in the right direction and eventually helped me to figure out what the problem was. Respect to you all.
Upvotes: 3