Results 1 to 4 of 4

Thread: Error while installing Qt from source (4.7.4)

  1. #1
    Join Date
    Sep 2010
    Location
    Bangalore
    Posts
    169
    Thanks
    59
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Unhappy Error while installing Qt from source (4.7.4)

    Hi everyone,

    I am trying to install Qt for windowsXP and MinGW tool chain by compiling it from source. I followed the steps mentioned in the following link:- http://qt-project.org/wiki/Building_...ows_with_MinGW
    I did as mentioned, but I am getting a strange error when I do the following step:
    c:\qt-4.7.4\qt-everywhere-opensource-src-4.7.4\configure.exe -redo
    The error is:-
    C:\qt-4.7.4\4.7.4-qt-x86-build/include/QtCore/../../../qt-everywhere-opensource-src-4.7.4/src/corelib/tools/qbytearray.h:48:20: fatal error: string.h: No such file or directory
    compilation terminated.
    Makefile:306: recipe for target 'project.o' failed
    mingw32-make: *** [project.o] Error 1
    string.h is located in my C:\MinGW\lib\gcc\mingw32\4.7.2\include\ssp. I tried mentioning this path in configure.exe as follows:-
    -I C:\MinGW\lib\gcc\mingw32\4.7.2\include
    But still it's not able to find the file. Can someone please guide me as to what changes I need to do to get rid of this error?

  2. #2
    Join Date
    Sep 2010
    Location
    Bangalore
    Posts
    169
    Thanks
    59
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Error while installing Qt from source (4.7.4)

    This error solved. There was problem with the MinGW package.

  3. #3
    Join Date
    Feb 2013
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error while installing Qt from source (4.7.4)

    Could you describe, what you have changed on your MinGW environment to fix this issue?

    Thanks!!

  4. #4
    Join Date
    Sep 2010
    Location
    Bangalore
    Posts
    169
    Thanks
    59
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Error while installing Qt from source (4.7.4)

    Hi MtJoke,
    Since it has been a long time since I posted this so I don't remember the exact nature of errors that I had faced and how I solved all of them. But yes, once I was able to successfully compile Qt from source I had documented the details for my reference so that it may help me in future. Here are the steps that I had documented:-

    SDK- Qt
    Toolchain - Mingw32
    OS - XP (x86)
    3rd Party - OpenSSL (My main aim was to include OpenSSL support in Qt)

    1) First of all we need to compile the openSSL from source. The best cmd for OpenSSL is MSYS command prompt. To build MSYS cmd, follow the link:-
    http://www.mingw.org/wiki/MSYS (don't forget to set the PATH variable as mentioned in the link )
    2) Now compile the OpenSSL and set the Env Vars required for linking with Qt during it's compilation. For that refer to :- http://qt-project.org/wiki/Compiling-OpenSSL-with-MinGW
    3) Now since both MinGW and OpenSSL are ready as per Qt requirement, refer to the following link for Qt compilation:-
    http://qt-project.org/wiki/Building_...ows_with_MinGW

    Things to be noted (Before reading the lines below first try compiling once otherwise you will find the below lines confusing):-
    While setting OPENSSL_LIBS="-lssl -lcrypto -lgdi32 -luser32" option in your configure.cache file it may throw an error as unrecognised option....for that the best option is to directly configure rather than using the cache file. I mean from the build folder type
    C:\qt-4.7.4\qt-everywhere-opensource-src-4.7.4\configure.exe -platform win32-g++ -opensource -debug -debug-and-release -no-phonon -fast -nomake examples -nomake demos -no-dsp -no-vcproj -no-cetest -no-s60 -qt-sql-odbc -qt-sql-sqlite -plugin-sql-odbc -plugin-sql-sqlite -no-qt3support -no-opengl -no-openvg -no-incredibuild-xge -openssl OPENSSL_LIBS="-lssl -lcrypto -lgdi32 -luser32" -I C:\openssl-1.0.1c\dist\include -L C:\openssl-1.0.1c\dist

    It should be fine. Also if you got compiling error (while building my app): «cannot find -lQtCore4», «cannot find -lQtGui4». Here is the solution that helped me - edit file "qt-sources-dir/mkspecs/win32-g++/qmake.conf". Set QMAKE_LFLAGS = -static -static-libgcc .

    Some more links which may interest you:-
    http://sector.ynet.sk/qt4-tutorial/preparations.html
    http://code.google.com/p/qt-msvc-ins...locationTricks
    http://stackoverflow.com/questions/4...after-building

Similar Threads

  1. problem in installing qt4.4.3 source
    By wagmare in forum Qt-based Software
    Replies: 0
    Last Post: 18th February 2009, 06:48
  2. Installing QT open source
    By DPU_KOP in forum Newbie
    Replies: 2
    Last Post: 17th May 2007, 20:55
  3. Installing Qt 4.1.4 (open source) on windows with vs2005
    By Randulf in forum Installation and Deployment
    Replies: 1
    Last Post: 19th August 2006, 12:22
  4. Installing Qt 4.1 (open source) on Windows XP
    By katrina in forum Installation and Deployment
    Replies: 8
    Last Post: 19th February 2006, 12:26

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.