• 7347阅读
  • 4回复

关于QT安装的问题 [复制链接]

上一主题 下一主题
离线zonefour
 

只看楼主 倒序阅读 楼主  发表于: 2007-08-26
关于QT安装的问题
— 本帖被 XChinux 执行加亮操作(2008-07-17) —
关于QT安装的问题
我在cygwin下安装qt
(1)首先从Trolltech网站下载qt-x11-opensource-src-4.3.1.tar
(2)然后按照里面的install文件安装。文件内容如下。
INSTALLING Qt/X11 Version 4.3.1.

1.  If you have the commercial edition of Qt, install your license
    file as $HOME/.qt-license.

    For the open source version you do not need a license file.

2.  Unpack the archive if you have not done so already:

        cd /tmp
        gunzip qt-x11-opensource-src-4.3.1.tar.gz        # uncompress the archive
        tar xvf qt-x11-opensource-src-4.3.1.tar          # unpack it

    This creates the directory /tmp/qt-x11-opensource-src-4.3.1 containing the files
    from the archive. We only support the GNU version of the tar
    archiving utility. Note that on some systems it is called gtar.

3.  Building

    To configure the Qt library for your machine type, run the
    ./configure script in the package directory.

    By default, Qt is configured for installation in the
    /usr/local/Trolltech/Qt-4.3.1 directory, but this can be
    changed by using the -prefix option. Alternatively, the
    -prefix-install option can be used to specify a "local"
    installation within the source directory.

        cd /tmp/qt-x11-opensource-src-4.3.1
        ./configure

    Type "./configure -help" to get a list of all available options.

    To create the library and compile all the demos, examples, tools,
    and tutorials, type:

        make

    If you did not configure Qt using the -prefix-install option,
    you need to install the library, demos, examples, tools, and
    tutorials in the appropriate place. To do this, type:

        su -c "make install"

    and enter the root password.

    Note that on some systems the make utility is named differently,
    e.g. gmake. The configure script tells you which make utility to
    use.

    If you need to reconfigure and rebuild Qt from the same location,
    ensure that all traces of the previous configuration are removed
    by entering the build directory and typing

        make confclean

    before running the configure script again.

4.  Environment variables

    In order to use Qt, some environment variables needs to be
    extended.

        PATH              - to locate qmake, moc and other Qt tools

    This is done like this:

    In .profile (if your shell is bash, ksh, zsh or sh), add the
    following lines:

        PATH=/usr/local/Trolltech/Qt-4.3.1/bin:$PATH
        export PATH

    In .login (in case your shell is csh or tcsh), add the following line:

        setenv PATH /usr/local/Trolltech/Qt-4.3.1/bin:$PATH

    If you use a different shell, please modify your environment
    variables accordingly.

    For compilers that do not support rpath you must also extended the
    LD_LIBRARY_PATH environment variable to include
    /usr/local/Trolltech/Qt-4.3.1/lib. On Linux with GCC this step
    is not needed.

5.  That's all. Qt is now installed.

    If you are new to Qt, we suggest that you take a look at the demos
    and examples to see Qt in action. Run the Qt Examples and Demos
    either by typing 'qtdemo' on the command line or through the
    desktop's Start menu.

    You might also want to try the following links:

        http://doc.trolltech.com/4.2/how-to-learn-qt.html
        http://doc.trolltech.com/4.2/tutorial.html
        http://www.trolltech.com/developer

    We hope you will enjoy using Qt. Good luck!

(3)在进行到上面install文件第三步时,实行./configure后,出现如下错误。

好像是缺一个头文件,并且qglobal.cpp中有语法错误。
见附件
附件: 关于QT安装的问题.rar (14 K) 下载次数:25
离线zonefour

只看该作者 1楼 发表于: 2007-08-27
有没有高手指点一下啊。
离线zonefour

只看该作者 2楼 发表于: 2007-08-28
高手高手啊。

只看该作者 3楼 发表于: 2007-08-29
我还是有问题我是用的是vs2005然后问题是fatal error U1077 : 'mt.exe' return code '0x1f' Stop
谁能帮帮我啊?

只看该作者 4楼 发表于: 2007-08-29
编译的是qt4.1.2的开源版本.
快速回复
限100 字节
 
上一个 下一个