[Qt-interest] dll problem

Evan Teran eteran at alum.rit.edu
Mon Dec 8 04:10:51 CET 2008


Thanks for the info, I have some ideas about what it could be. I'll be
sure to post to the list when I find a perminant solution. Part of my
problem is that my original dev environment is Linux and so I don't
quite have my debugging tools setup quite in a comfortable way yet, so
it's hard to pin down the exact cause.

Deepak Chandran wrote:
> I have an application (runs in all OS) where practically all the work is
> done by the plugins. I have creates a main library. The main executable
> just loads the main library and creates the main widget. The other
> plugins use the main library to access the classes, so in my .pro file
> for the plugins, I have:
> 
> unix:LIBS += -L. -lmainlib
> win32:LIBS +=  mainlib.dll
> 
> works smoothly...I use dynamic libraries because then I don't have to
> recompile the other plugins if I change the main library. Hope that helps.
> 
> On Sun, Dec 7, 2008 at 5:15 AM, Evan Teran <eteran at alum.rit.edu
> <mailto:eteran at alum.rit.edu>> wrote:
> 
>     I have a QT application which makes use of many plugins which I have
>     written. The plugins do however need access to objects which are found
>     in the primary executable. On linux, I accomplished this by adding the
>     -rdynamic linker flag.
> 
>     Recently, I've tried to port my application to windows but have hit a
>     stumbling block. The plugins load fine, but it seems that every time
>     they try access a variable which is part of my main executable (in this
>     case it is a QWidget * which is to be the parent of a dialog that the
>     plugin would like to display) I get an access violation.
> 
>     Is there something special I need to do to make this work? Anyone have
>     any experience with this problem.
> 
>     I am using Visual Studio 2008 with QT 4.4.0. <http://4.4.0.>
> 
>     Thank you
>     _______________________________________________
>     Qt-interest mailing list
>     Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>     http://lists.trolltech.com/mailman/listinfo/qt-interest
> 
> 



More information about the Qt-interest-old mailing list