• 7720阅读
  • 5回复

WindowsXP下安装QT4.3.0的问题 [复制链接]

上一主题 下一主题
离线greatthanks
 

只看楼主 倒序阅读 楼主  发表于: 2007-06-19
WindowsXP下安装QT4.3.0的问题
— 本帖被 XChinux 执行加亮操作(2007-08-12) —
小弟一菜鸟,刚学QT,也没有Linux, 所以就在WindowsXP上装了一个最新的4.3.0版本的,但是发现安装集合贴里面并没有4.3.0,现在遇到问题,请诸位帮忙看看,谢谢了先
我的安装步骤如下:
1. 安装devcpp-4.9.9.2到目录D:\soft\Dev-cpp\
2.安装qt-win-opensource-4.3.0-mingw.exe,其间选中MinGW目录在D:\soft\Dev-cpp\
3.手动添加环境变量:加到Dev-cpp和QT下面的Include,LIb和bin到环境变量中的Include,Lib,和PATH下
4.从开始菜单里面选择QT 4.3.0 command promt,进入examples\tutorial\t1想尝试编译一下,但是出现如下错误:
D:\Soft\Qt\4.3.0\examples\tutorial\t1>qmake t1.pro

D:\Soft\Qt\4.3.0\examples\tutorial\t1>make
mingw32-make -f Makefile.Release
Makefile.Release:116: *** multiple target patterns.  Stop.
mingw32-make[1]: Entering directory `D:/Soft/Qt/4.3.0/examples/tutorial/t1'
mingw32-make[1]: Leaving directory `D:/Soft/Qt/4.3.0/examples/tutorial/t1'
mingw32-make: *** [release] Error 2

查了半天也没有查到是什么错误,请大家帮忙看看,写写了先,急呀
[ 此贴被XChinux在2007-08-12 22:53重新编辑 ]
离线greatthanks

只看该作者 1楼 发表于: 2007-06-19
现在发现可能是因为以前机器上装过VC6.0的问题,在Makefile.Release:116行看到有引入这些头文件,于是在环境变量里面把所有关于VC6.0的东西都给删除掉,重新Qmake和Make,但是现在又出现一个这样的问题:

D:\Soft\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: can
not find -lqtmaind
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\t1.exe] Error 1
mingw32-make[1]: Leaving directory `D:/Soft/Qt/4.3.0/examples/tutorial/t1'
mingw32-make: *** [debug-all] Error 2

现在变成了can not find -lqtmaind这个问题了,不知道为什么?
离线XChinux

只看该作者 2楼 发表于: 2007-06-20
用make release编译即可
-lxxxxd表示debug编译链接。没有debug库的话不行。
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
离线hyrish
只看该作者 3楼 发表于: 2007-06-20
或者在t1.pro文件中修改一下
CONFIG+=release
就可以直接编译释放版本
离线greatthanks

只看该作者 4楼 发表于: 2007-06-20
搞定了,我把QT编译了一下,然后那个库就出来,程序可以运行了,

谢谢各位帮忙!
离线浪漫天使
只看该作者 5楼 发表于: 2007-06-21
http://www.qtcentre.org/forum/f-installation-5/t-did-you-try-qt-43-opensource-on-winxp--7428.html

Do the following:

Open the Qt 4.3.0 console
Unset the INCLUDE and LIB environment variables, i.e.
"set lib = "
"set include = "
Do "del /s qconfig.h"
configure -debug_and_release (应该是-debug-and-release吧)
mingw32-make

I've followed this procedure and it appears to compile okay
[ 此贴被浪漫天使在2007-06-21 09:03重新编辑 ]
快速回复
限100 字节
 
上一个 下一个