• 6265阅读
  • 0回复

请教其qt4.3.4/dev-c++安装问题 [复制链接]

上一主题 下一主题
离线xiaoshu666
 

只看楼主 倒序阅读 楼主  发表于: 2008-05-05
— 本帖被 XChinux 执行加亮操作(2008-05-05) —
安装的是 qt-win-opensource-4.3.4-mingw.exe(安装在c:\qt\4.3.4)

devcpp-4.9.9.2_setup.exe(安装在f:\dev-cpp)

在系统变量中加了
PATH:
F:\Dev-Cpp\bin;C:\Qt\4.3.4\bin;
QTDIR:
C:\Qt\4.3.4
QMAKESPEC:
win32-g++

在dev-c++里的工具——》编译选项中
增加了(默认的都保留了)
A、设置inlcude头文件c:\qt\4.2.2\include
B、设置lib库文件c:\qt\4.2.2\lib

在"工程"-"工程属性"里设置:
C、设置连接器库文件,将c:\qt\4.2.2\lib加入其中。


可是按http://www.qtcn.org/bbs/simple/index.php?t7708.html
这个后面说的测试不能通过
错如 如下:
编译器: Default compiler
Building Makefile: "F:\proqt\test2\Makefile.win"
执行  make...
mingw32-make.exe -f "F:\proqt\test2\Makefile.win" all
g++.exe -c test.cpp -o test.o -I"C:/Qt/4.3.4/include"  -I"F:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"F:/Dev-Cpp/include/c++/3.4.2/backward"  -I"F:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"F:/Dev-Cpp/include/c++/3.4.2"  -I"F:/Dev-Cpp/include" 

g++.exe test.o  -o "test.exe" -L"C:/Qt/4.3.4/lib" 

test.o(.text+0x182):test.cpp: undefined reference to `_imp___ZN12QApplicationC1ERiPPci'
test.o(.text+0x1c5):test.cpp: undefined reference to `_imp___ZN7QWidgetC1EPS_6QFlagsIN2Qt10WindowTypeEE'
test.o(.text+0x1f6):test.cpp: undefined reference to `_imp___ZN7QWidget14setWindowTitleERK7QString'
test.o(.text+0x28d):test.cpp: undefined reference to `_imp___ZN12QApplication4execEv'

test.o(.text+0x2aa):test.cpp: undefined reference to `QWidget::~QWidget()'
test.o(.text+0x2bf):test.cpp: undefined reference to `QApplication::~QApplication()'
test.o(.text+0x2ee):test.cpp: undefined reference to `QWidget::~QWidget()'
test.o(.text+0x31b):test.cpp: undefined reference to `QApplication::~QApplication()'
test.o(.text$_ZN7QStringD1Ev[QString::~QString()]+0x20):test.cpp: undefined reference to `_imp___ZN7QString4freeEPNS_4DataE'
test.o(.text$_ZN7QStringC1EPKc[QString::QString(char const*)]+0x19):test.cpp: undefined reference to `_imp___ZN7QString16fromAscii_helperEPKci'
collect2: ld returned 1 exit status

mingw32-make.exe: *** [test.exe] Error 1

执行结束

请教各位是为什么!??
为了猪一样的身体,象猪一样的活着!
快速回复
限100 字节
 
上一个 下一个