Qt-interest Archive, November 2007
Release is different from Debug in Windows
Message 1 in thread
Hello.
I have a trouble about difference between Release and Debug version
on Windows.
I want to use QPixmap in exported function of DLL(Dynamic link library).
Exporting has no problem. But following function, Handle is valid
in a version compiled on Debug in VisualStudio2005. But Handle is NULL
in compliled Release. Then it causes critical error in QPixmap
constructor on Release version. How should I do to let
QCoreApplication::instance () derive to DLL?
Best regards
extern "C"{
__declspec(dllexport) QIcon *DLL_GetIcon(void);
};
__declspec(dllexport) QIcon *DLL_GetIcon(void)
{
QCoreApplication *Handle=QCoreApplication::instance (); //For test
QPixmap D(":Resources/Panel.png");
return(new QIcon(D));
}
My environment:
IDE : VisualStudio2005
Compiler : Intel compiler 10.0.27
Qt : 4.3.2
OS : WindowsXP 64bit edition
===================================
Masatoshi Sasai
EMail:ms441125@xxxxxxxxxxxxxxxxxxxxx
--
[ signature omitted ]