[Qt-interest] dll call function

Michael user23 at web.de
Tue Jun 8 22:55:23 CEST 2010


Am 08.06.2010 13:54, schrieb matteo:
> We have a no-qt dll compiled with Borland/builder that call a function 
> of a qt dll compiled in visual studio.
> The problem is when I use QComboBox: if I open a widget with a combo, 
> click on the combo, close the widget and reopen it, the system crash
> (access violation at address 6702485f in module 'QtCodred4.dll'.
>   
You ment QtCored4.dll?
> We call the function in way:
>
> 	int argc = 0;
> 	QApplication a(argc,NULL);
> 	GeneralDataWidget widgetGeneralDataWidget;
> 	widgetGeneralDataWidget.InternalEnter(); //my function
> 	widgetGeneralDataWidget.exec();
>
> Suggestions?
>
> Thanks
> Teo
>   
I experienced such problems when messing around with std::string.
It's possible that you have a similar problem here. I'll try to describe
it a bit.
You will almost always get punished for passing a pointer to an object
from one dll to an other.
That's because the object may be using different versions of new and
delete and smashing
your heap.
Hope, this gives you a hint...

Michael



More information about the Qt-interest-old mailing list