flyonok

统计

留言簿(8)

ACE

book

boost

bsd

c study

c++

code download

codeblock

computer clound

Eclipse

embed system

erlang

ET++

gtk

ic card

java

KDE

libevent

linux

linux--MM

mysql

network education

one card

oracle

pcap relation

php

powerbuilder

python

QT

software config

software test

SQL server

UML

wireless

wxwidgets

陈宾

阅读排行榜

评论排行榜

compile with mingw on win32 platform

Requirements

Install MinGW

  • Please follow the instructions at MinGW documentation page.

Get the Q... sources

  • by downloading a Qt 3 source snapshot from the qtwin download area
  • or from the svn repository (qtwin.svn.sourceforge.net)

    checkout the sources with

    c:\source>  svn co https://qtwin.svn.sourceforge.net/svnroot/qtwin/qt-3/trunk qt-3

Compiling Qt with command line tools

  • Open a cmd shell (make sure you haven't msys or cygwin in your PATH!)
  • Setup Qt environment
    c:\source> set QTDIR=< qt3 source root >
    c:\source> set MINGW=< MinGW installation root >
    c:\source> set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH%
    c:\source> set QMAKESPEC=win32-g++

  • Configure and build the source
    The script first creates link_includes.exe and configure.exe which are needed for bootstrap the build process. link_includes copies all relevant Qt headers into the include-directory. configure.exe is the replacement for the ./configure-script unter Unix/Linux. After that, qmake.exe is build and the compilation gets started.
    c:\source> cd < qt3 source root >
    c:\source\qt-3> configure.bat [-fast] [-verbose]

    configure knows some of the parameters of the x11 release configure script like -fast or -verbose.
    For a full list see bin\configure.exe -help.

    This should build the whole Qt release. If it breaks you can restart compiling with

    c:\source\qt-3> mingw32-make [< target >]

    for a list of all available targets see the toplevel Makefile

  • Start Qt applications
    c:\source\qt-3> designer
    c:\source\qt-3> assistant
    c:\source\qt-3> linguist
    c:\source\qt-3> cd tutorial\t1
    c:\source\qt-3\tutorial\t1> t1

MinGW Notes

  • by jay snyder: I found that I needed to remove all references to my cygwin installation from my path, or mingw32-make was trying to use c:\cygwin\bin\sh.exe as a shell instead of CMD.EXE. Since the mingw32 makefiles for the win32-g++ qmakespec are written to use CMD.EXE, this is a problem. If I removed cygwin from my path, then the configure.bat build worked fine.
  • by Ralf Habacker: Linking the shared Qt library needs much time. You can reduce the linking time by using the -static configure option.

posted on 2008-05-05 11:46 flyonok 阅读(748) 评论(0)  编辑 收藏 引用 所属分类: QT


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理