[Qt-interest] dll problem

Deepak Chandran dchandran1 at tinkercell.com
Sun Dec 7 22:55:31 CET 2008


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> 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.
>
> Thank you
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081207/98fab3cc/attachment.html 


More information about the Qt-interest-old mailing list