[Qt-interest] Qt plugin error: undefined reference to `MainWindow::staticMetaObject'

程梁 chengliang.soft at gmail.com
Thu Apr 29 15:02:48 CEST 2010


This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.

If this email is from an unknown source, please simply delete this email.

If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.

+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip".  Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".

Additional instructions and options on how to receive these attachments can be found at:

http://security.it.ray.com/antivirus/extensions.html
http://security.it.ray.com/news/2007/zipfiles.html

Should you have any questions or difficulty with these instructions, please contact the Help Desk at 877.844.4712

---

Now I think I should create a plugin, not a library, am I right? Then the
macro
Q_EXPORT_PLUGIN2 should be added, too.

OK, now the question is when I added this macro, the compiler error is
"undefined reference to `MainWindow::~MainWindow()'" and so on. Then how to
solve
this problem? I'll paste my project here.

Thank you for help me!

2010/4/29 Thiago Macieira <thiago at kde.org>

> Em Quinta-feira 29 Abril 2010, às 09:46:55, 程梁 escreveu:
> > Maybe the problem is what is a library and what is a plugin. What I want
> is
> > I try to put all
> > UI components into a dll so this is a library. But how can QLibrary load
> > this as an instance
> > of QWidget? The document only says it can import functions in libraries.
>
> You load a plugin, not a library.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>  Senior Product Manager - Nokia, Qt Development Frameworks
>      PGP/GPG: 0x6EF45358; fingerprint:
>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>


-- 
Cheng Liang
from: chengliang.soft at gmail.com




More information about the Qt-interest-old mailing list