[Qgis-developer] Cannot inherit from QgsVectorLayer in plugin on Windows

Mateusz Loskot mateusz at loskot.net
Mon Aug 28 11:31:05 EDT 2006


Radim Blazek wrote:
> Hi,
> I dont think this is the case because I have compiled
> everything with the same libraries and especially
> it does not crash, it fails to load the library!
> QLibrary.load() fails, that means before any piece of
> my code is executed.
> The class does not need to be used at all. It fails to load
> the plugin if I compile into the plugin this class:
> 
> BiogeoSource::BiogeoSource ( QString n, QString p, QString l )
>    : QgsVectorLayer ( n, p, l) {};
> BiogeoSource::~BiogeoSource(){}

Does If the crash occurs on QLibrary::load() then I suppose
the BiogeoSource object is crated during "on DLL load"
and then QgsVectorLayer ctor is called too.
May be QString passed across DLL boundaries make troubles,
I don't know.

Sorry, I can't give any more details here.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Qgis-developer mailing list