• 6938阅读
  • 5回复

Qt Evaluation版的问题 [复制链接]

上一主题 下一主题
离线70780533
 

只看楼主 倒序阅读 楼主  发表于: 2008-10-06
— 本帖被 XChinux 执行加亮操作(2008-10-07) —
大家好,我今天装上了Qt Evaluation 和vs2005
但写很简单的代码都有错误
代码是
#include <QtGui/QApplication>
#include <QtGui/QLabel>


int main(int argc, char *argv[])
{
    QApplication app(argc,argv);
    QLabel *label = new QLabel("Hello Qt",0);
    label->show();
    return app.exec();
}
出现很多错误
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::dropEvent(class QDropEvent *)" (?dropEvent@QWidget@@MAEXPAVQDropEvent@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::showEvent(class QShowEvent *)" (?showEvent@QWidget@@MAEXPAVQShowEvent@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::hideEvent(class QHideEvent *)" (?hideEvent@QWidget@@MAEXPAVQHideEvent@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual bool __thiscall QWidget::winEvent(struct tagMSG *,long *)" (?winEvent@QWidget@@MAE_NPAUtagMSG@@PAJ@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QLabel::changeEvent(class QEvent *)" (?changeEvent@QLabel@@MAEXPAVQEvent@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::inputMethodEvent(class QInputMethodEvent *)" (?inputMethodEvent@QWidget@@MAEXPAVQInputMethodEvent@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "public: virtual class QVariant __thiscall QWidget::inputMethodQuery(enum Qt::InputMethodQuery)const " (?inputMethodQuery@QWidget@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual bool __thiscall QLabel::focusNextPrevChild(bool)" (?focusNextPrevChild@QLabel@@MAE_N_N@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::styleChange(class QStyle &)" (?styleChange@QWidget@@MAEXAAVQStyle@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::enabledChange(bool)" (?enabledChange@QWidget@@MAEX_N@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::paletteChange(class QPalette const &)" (?paletteChange@QWidget@@MAEXABVQPalette@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::fontChange(class QFont const &)" (?fontChange@QWidget@@MAEXABVQFont@@@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::windowActivationChange(bool)" (?windowActivationChange@QWidget@@MAEX_N@Z)
1>QtLearning.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall QWidget::languageChange(void)" (?languageChange@QWidget@@MAEXXZ)

我装完QT时设置了环境变量 include和lib
这需要设置吗
谢谢!!
离线fj33xx

只看该作者 1楼 发表于: 2008-10-07
在链接那里指定链接项link.
离线70780533

只看该作者 2楼 发表于: 2008-10-07
楼上能不能说详细点呢 我真的是太菜了!
离线70780533

只看该作者 3楼 发表于: 2008-10-09
链接错误是哪个环境变量设置不对呢?
离线optphantom

只看该作者 4楼 发表于: 2008-10-12
还装了别的版本的Qt吗?
离线neohope

只看该作者 5楼 发表于: 2008-10-13
qmake -project
qmake
nmake
快速回复
限100 字节
 
上一个 下一个