Monday 17 May 2010

How to Build Qt 4.6.2 on Windows XP with MinGW

How to Build Qt on Windows with MinGW:
  1. Download qt-sdk-win-opensource-2010.02.1.exe
  2. Extract to c:\qt
  3. start > all programs > qt sdk by nokia v2010.02.1 (open source) > qt command prompt
  4. mingw32-make confclean
  5. configure
  6. mingw32-make

I use the following command to configure:
  • configure -platform win32-g++ -no-phonon -no-phonon-backend -no-webkit -fast -debug -opensource -shared -no-qt3support -no-sql-sqlite -no-openvg -no-gif -no-libpng -no-libmng -no-libtiff -no-libjpeg -no-script -no-scripttools -nomake examples -nomake demos -no-xmlpatterns

Explanation:
  • -platform win32-g++ (specify your platform and your compiler)
  • -no-phonon (often crashes here)
  • -no-phonon-backend (often crashes here)
  • -no-webkit (often crashes here)
  • -fast (generate Makefiles during the compiling step instead of during the configuring step)
  • -debug
  • -opensource
  • -shared
  • -no-qt3support
  • -no-sql-sqlite
  • -no-openvg (no vector graphics)
  • -no-gif
  • -no-libpng
  • -no-libmng
  • -no-libtiff
  • -no-libjpeg
  • -no-scripttools (often crashes here)
  • -nomake examples (these take ages)
  • -nomake demos (these take ages)
  • -no-xmlpatterns (often crashes here)

Useful commands
  • To bring up the help, pick one of the following switches:

    -h -help -?

  • For example:

    configure -h

References

Related Links

2 comments:

  1. Hey Thanks. Was useful in helping me build a minimum QT under MinGW.

    Also been trying to build Phonon with MinGW. Need an additional SDK for this, but gave up and went with MSVC for this one.

    Also like your AI posts. Good stuff.

    ReplyDelete
  2. Hi Andy!

    Thanks for stopping by and leaving a comment, glad that you found this useful. Good luck with building Phonon!

    ReplyDelete