• 7436阅读
  • 2回复

在VC下搭建好Qt开发环境,编译不通过,请达人指点 [复制链接]

上一主题 下一主题
离线apm70
 
只看楼主 倒序阅读 楼主  发表于: 2007-04-07
— 本帖被 XChinux 执行加亮操作(2008-07-20) —
我把Qt开发工具都集成到了VC++6.0,头文件、库、bin都加了,但是编译examples例子时,又很多错,不知道什么问题。请达人指点。
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setNum(int)" (?setNum@QLabel@@UAEXH@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setNum(double)" (?setNum@QLabel@@UAEXN@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setMovie(class QMovie const &)" (?setMovie@QLabel@@UAEXABVQMovie@@@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setPicture(class QPicture const &)" (?setPicture@QLabel@@UAEXABVQPicture@@@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setPixmap(class QPixmap const &)" (?setPixmap@QLabel@@UAEXABVQPixmap@@@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setText(class QString const &)" (?setText@QLabel@@UAEXABVQString@@@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setBuddy(class QWidget *)" (?setBuddy@QLabel@@UAEXPAVQWidget@@@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setAutoResize(bool)" (?setAutoResize@QLabel@@UAEX_N@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QLabel::setAlignment(int)" (?setAlignment@QLabel@@UAEXH@Z)
hello.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QFrame::frameChanged(void)" (?frameChanged@QFrame@@MAEXXZ)
hello.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QLabel::drawContents(class QPainter *)" (?drawContents@QLabel@@MAEXPAVQPainter@@@Z)
hello.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QFrame::drawFrame(class QPainter *)" (?drawFrame@QFrame@@MAEXPAVQPainter@@@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QFrame::setFrameRect(class QRect const &)" (?setFrameRect@QFrame@@UAEXABVQRect@@@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QFrame::setMidLineWidth(int)" (?setMidLineWidth@QFrame@@UAEXH@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QFrame::setMargin(int)" (?setMargin@QFrame@@UAEXH@Z)
hello.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QFrame::setLineWidth(int)" (?setLineWidth@QFrame@@UAEXH@Z)
。。。。
hello.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QPtrList<class QWidget>::~QPtrList<class QWidget>(void)" (__imp_??1?$QPtrList@VQWidget@@@@UAE@XZ)
Debug/hello.exe : fatal error LNK1120: 146 unresolved externals
Error executing link.exe.
hello.exe - 147 error(s), 0 warning(s)
[ 此贴被XChinux在2008-07-20 23:04重新编辑 ]
离线wyb513

只看该作者 1楼 发表于: 2007-04-09
我和你遇到了一样的问题,只是我用的是vc2003.net.同样是想用vc来编译examples中的例子,起初编译都有错,后来在配置里加了相关头文件的路径,编译是通过了,但是链接有错啊,是没找到相应的lib文件吗,请高手指点指点啊
离线htyoung

只看该作者 2楼 发表于: 2007-04-09
如果是VC++2005 express的如下图 加入inlcude 和lib
***
QT5
***
快速回复
限100 字节
 
上一个 下一个