• 7881阅读
  • 3回复

在windows下vc6.0环境下安装qt3.1.2失败?请问大家 [复制链接]

上一主题 下一主题
离线scu6317
 

只看楼主 倒序阅读 楼主  发表于: 2008-03-13
— 本帖被 XChinux 执行加亮操作(2008-07-17) —
在windows下vc6.0环境下安装qt3.1.2失败?请问大家
vc也安装完了,可以使用,qt也安装了,最后在vc的工具条上出现了qt designer的图标,点击后提示:can‘t locate qt designer

请问是怎么回事啊?

以前我也这么装过的,可以使用。由于中了毒,重新装了系统,难道是操作系统的原因???
谢谢大家了
离线zncggaofei
只看该作者 1楼 发表于: 2008-03-13
要是点击qt designer原文件能运行的话,看看路径是否正确????????
There is someone that is coming or passing away in your life around the clock, so you may lose sight of those seen, and forget those remembered. There is gain and loss in your life, so you may catch sight of those unseen, and remember those forgotten. Nevertheless, doesn’t the unseen exist for sure? Will the remembered remain forever?
离线feiying888

只看该作者 2楼 发表于: 2008-03-17
你的是商业版的吗?  免费版本的好像不能在VC下安装
离线zncggaofei
只看该作者 3楼 发表于: 2008-03-17
这话说的,看这个

转自:http://blog.csdn.net/lelexy/archive/2008/01/24/2063718.aspx



QT4.3.2在VC++ 6.0下安装过程     
  今天把自己在windowsXP下弄QT的东西整理一下,参考了网上的一些资料,把自己在vc6.0下安装qt的过程和大家一起分享一下.
1 编译QT

  1)下载QT的源代码文件包(注意:必须是.zip后缀的,.exe后缀的包是用mingw做编译器的源代码文件)。

  2)将QT源代码解压到硬盘。

    例如: C:\Qt\4.3.0\ 或  C:\Qt\4.3.0-msvc\ 

2 下载并安装允许QT用vc编译的补丁。

  1)从网站 sourceforge.net下载acs-4.3.0-patch2.zip 。

  2)将其解压到QT源代码的目录下。

3 打开命令行工具,并把路径切换到QT源代码的目录下。

  运行cmd.exe,然后切换到路径到C:\Program Files\Microsoft Visual Studio\VC98\Bin(VC路径),运行vcvars32.bat ,设置vc6.0编译文件的路径。

  确保环境设置正确的方法是看看nmake.exe是否在路径中:

D:\Qt\4.3.0> nmake /?

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0

Copyright (C) Microsoft Corp1988-1998.  All rights reserved.

Usage:  NMAKE @commandfile
        NMAKE [options] [/f makefile] [/x stderrfile] [macrodefs] [targets]

Options:

4 给QT源代码打补丁

运行D:\Qt\4.3.0> installpatch43.bat

将会看到下面的一些内容:

D:\Qt\4.3.0> installpatch43.bat
patching file qconfigure.bat
patching file examples/threads/waitconditions/waitconditions.pro
patching file misc/bcc32pch/Makefile.win32-borland
patching file misc/bcc32pch/bcc32pch.cpp
patching file misc/bcc32pch/bcc32pch.pri
patching file misc/bcc32pch/bcc32pch.pro
patching file mkspecs/win32-bccx/qmake.conf

5 安装QT

  如果不清楚使用什么选项,可以运行configure-opensource.exe

  然后运行D:\Qt\4.1.1>qconfigure.bat msvc

  开始的时候会提问是否接受GPLlicence,输入y。然后就是漫长的等待了。
据说编译期间会出现一个错误(不过我没有遇到),fatal error C1083: Cannot open include file: 'uxtheme.h': No such file or directory

提示Uxtheme.h 和Tmschema.h找不到,而Schemadef.h是在Tmschema.h里调用的,所以还需要另外三个文件,这在VC6里面没有,包含在Windows PlatformSDK安转了Visual Studio 2003或 Visual Studio 2005 中都有PlatformSDK。若安装过,就不必费尽去下载385.0 MB的SDK了,默认安装的话三个文件都在
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include
(Uxtheme.h 中定义了在向控件添加外观风格的步骤中以及在相应的代码示例中所引用的 UxTheme API;Tmschema.h 中定义了各个类。

可以到这里下载http://www.cnblogs.com/xcvm/archive/2006/03/08/346013.html

把这三个文件加到vc的include文件夹下,就可以通过编译了。

还有一个错误是NMAKE: fatal error U1077: 'cl.exe' : return code: '0x80' Stop

在网上搜了一下,有人说是内存不足的原因,我也遇到了,重启了一下电脑,只开了一个编译QT的窗口后就什么问题也没有了。

6 设置环境变量

PATH = D:\Qt\4.1.1\bin

QMAKESPEC = win32-msvc

然后重启一下.
检查路径设置的是否正确:

C:\> qmake -v
QMake version: 2.00a
Using Qt version 4.1.1 in D:\Qt\4.1.1\lib

C:\> echo %QMAKESPEC%
win32-msvc

至此,QT就安装好了。

下面用一个小程序测试一下

创建文件名为hello.cpp,输入如下代码:

#include <QApplication>
#include <QLabel>

int main(int argc, char **argv) {
  QApplication app(argc, argv);
  QLabel *label = new QLabel("Hello World!");
 
  label->show();

  return app.exec();
}

然后

prompt> qmake -project -o hello.pro

prompt> qmake

prompt> nmake

就会在debug文件夹下生成一个.exe文件。

7.通过VC IDE来编写程序
产生工程的时候,通过命令“qmake -tp vc -o hello.dsp hello.pro”来产生,这时候,就在目录下面生成了"hello.dsp"的VC工程文件。
用VC的IDE就打开就可以编译运行了。
There is someone that is coming or passing away in your life around the clock, so you may lose sight of those seen, and forget those remembered. There is gain and loss in your life, so you may catch sight of those unseen, and remember those forgotten. Nevertheless, doesn’t the unseen exist for sure? Will the remembered remain forever?
快速回复
限100 字节
 
上一个 下一个