Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Compile Qt 5.1.1 with Cygwin (64bit) shipped MinGW64 compiler on Windows 7
QtWS25 Last Chance

Compile Qt 5.1.1 with Cygwin (64bit) shipped MinGW64 compiler on Windows 7

Scheduled Pinned Locked Moved Installation and Deployment
36 Posts 4 Posters 21.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mr_Ada
    wrote on 23 Oct 2013, 05:28 last edited by
    #7

    Also I had to do a dos2unix on the ascii files from the opensource file!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 23 Oct 2013, 06:54 last edited by
      #8

      Mr_Ada If you download the source code as a .zip, it will have Windows line endings. If you want Unix ones, download the tarball.

      And in general, if you want to do unix stuff, compile on Linux and you will save yourself a lot of trouble :)

      To compile Qt with debug symbols, just pass -developer-build to configure.

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mr_Ada
        wrote on 23 Oct 2013, 06:58 last edited by
        #9

        I'll try the tarball on Cygwin but I'd still would like to be able to compile on Windows XP64 since I do a lot of my development on Windows. I'll go to linux (probably Ubuntu) and see if my bindings to Ada work there as well.

        In older versions of Qt they provided debug libraries. Now it is a real pain.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mr_Ada
          wrote on 23 Oct 2013, 07:16 last edited by
          #10

          Creating qmake...
          g++ -c -o project.o -pipe -g -g -DQMAKE_OPENSOURCE_EDITION -I/cygdrive/c/qt_src/qtbase/qmake -I/cygdrive/c/qt_src/qtbase/qmake/library -I/cygdrive/c/qt_src/qtbase/qmake/generators -I/cygdrive/c/qt_src/qtbase/qmake/generators/unix -I/cygdrive/c/qt_src/qtbase/qmake/generators/win32 -I/cygdrive/c/qt_src/qtbase/qmake/generators/mac -I/cygdrive/c/qt_src/qtbase/qmake/generators/integrity -I/cygdrive/c/qt_src/qtbase/include -I/cygdrive/c/qt_src/qtbase/include/QtCore -I/cygdrive/c/qt_src/qtbase/include/QtCore/5.1.1 -I/cygdrive/c/qt_src/qtbase/include/QtCore/5.1.1/QtCore -I/cygdrive/c/qt_src/qtbase/src/corelib/global -DHAVE_QCONFIG_CPP -I/cygdrive/c/qt_src/qtbase/mkspecs/cygwin-g++ -I/cygdrive/c/qt_src/qtbase/tools/shared -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DPROEVALUATOR_DEBUG -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM /cygdrive/c/qt_src/qtbase/qmake/project.cpp
          g++.exe: error: /cygdrive/c/qt_src/qtbase/qmake/project.cpp: No such file or directory

          g++.exe: fatal error: no input files

          compilation terminated.

          Makefile:163: recipe for target 'project.o' failed
          make: *** [project.o] Error

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mr_Ada
            wrote on 23 Oct 2013, 07:18 last edited by
            #11

            That is the error I got. The files does exist where it says it does. My g++ is the Qt5 binary distributions at:
            $ g++ -v
            Using built-in specs.
            COLLECT_GCC=C:\Qt5\Tools\mingw48_32\bin\g++.exe
            COLLECT_LTO_WRAPPER=c:/qt5/tools/mingw48_32/bin/../libexec/gcc/i686-w64-mingw32/4.8.0/lto-wrapper.exe
            Target: i686-w64-mingw32
            Configured with: ../../../src/gcc-4.8.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/temp/x32-480-posix-dwarf-r2/mingw32 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-host-libstdcxx='-static -lstdc++' --with-libiconv --with-system-zlib --with-gmp=/temp/mingw-prereq/i686-w64-mingw32-static --with-mpfr=/temp/mingw-prereq/i686-w64-mingw32-static --with-mpc=/temp/mingw-prereq/i686-w64-mingw32-static --with-isl=/temp/mingw-prereq/i686-w64-mingw32-static --with-cloog=/temp/mingw-prereq/i686-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='rev2, Built by MinGW-builds project' --with-bugurl=http://sourceforge.net/projects/mingwbuilds/ CFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp/mingw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp/mingw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/temp/x32-480-posix-dwarf-r2/libs/lib -L/temp/mingw-prereq/x32-zlib/lib -L/temp/mingw-prereq/i686-w64-mingw32-static/lib -L/temp/x32-480-posix-dwarf-r2/mingw32/opt/lib'
            Thread model: posix
            gcc version 4.8.0 (rev2, Built by MinGW-builds project)

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mr_Ada
              wrote on 23 Oct 2013, 07:18 last edited by
              #12

              My configure command is:
              ./configure -prefix /cygdrive/c/Qt5d -debug -developer-build -opensource -confirm-license -static -platform cygwin-g++ -qt-zlib -qt-libpng -qt-libjpeg -verbose

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JKSH
                Moderators
                wrote on 23 Oct 2013, 07:59 last edited by
                #13

                I'm not sure if you can use the Win32 (native Windows) variant of MinGW on Cygwin. You might need a copy of MinGW that was specifically built for Cygwin.

                -I do know, however, that the configure script doesn't work on Windows, even within Cygwin. You'll need to run configure.bat instead.- EDIT: Sorry, I was thinking of MSYS, not Cygwin!

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Mr_Ada
                  wrote on 23 Oct 2013, 14:00 last edited by
                  #14

                  intersting! I would not have expected a DOS script to work in CYGWIN!

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    JKSH
                    Moderators
                    wrote on 23 Oct 2013, 14:14 last edited by
                    #15

                    Ack, sorry, I just realized I remembered wrongly. I was thinking of MSYS, not Cygwin! I've never tried compiling Qt on Cygwin before.

                    But like I said in your other thread, you'll probably have better luck doing a native Windows build instead of a Cygwin build which adds a POSIX layer to your system.

                    [quote]
                    @
                    COLLECT_GCC=C:\Qt5\Tools\mingw48_32\bin\g++.exe
                    @
                    [/quote]That's a native Windows toolchain, so I doubt that works on Cygwin either.

                    What errors do you get when you try to compile in CMD?

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mr_Ada
                      wrote on 23 Oct 2013, 14:46 last edited by
                      #16

                      Ok. My toolchain was wrong, so I fixed my path. Here is an output (I changed the folder name so that I didn't have it so long):
                      C:\qt_src>configure -prefix C:\Qt5d -debug -developer-build -opensource -confirm -license -static -platform cygwin-g++ -qt-zlib -qt-libpng -qt-libjpeg -verbose

                      • cd qtbase
                      • C:\qt_src\qtbase\configure.bat -prefix C:\Qt5d -debug -developer-build -opensource -confirm-license -static -platform cygwin-g++ -qt-zlib -qt-libpng -qt-libjpeg -verbose
                        'C:\qt_src\qtbase\configure.exe' is not recognized as an internal or external command, operable program or batch file
                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        Mr_Ada
                        wrote on 23 Oct 2013, 14:47 last edited by
                        #17

                        strange that it would look for an exe when there is a bat file there.

                        I think I am using the tarball source code. Maybe that is throwing things off....

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          JKSH
                          Moderators
                          wrote on 23 Oct 2013, 14:52 last edited by
                          #18

                          [quote]
                          @

                          • cd qtbase
                          • C:\qt_src\qtbase\configure.bat -prefix C:\Qt5d -debug -developer-build -opensource -confirm-license -static -platform cygwin-g++ -qt-zlib -qt-libpng -qt-libjpeg -verbose
                            @
                            [/quote]
                            Don't go into 'qtbase'. Call configure.bat in C:\qt_src, and then call make in C:\qt_src.

                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            Mr_Ada
                            wrote on 23 Oct 2013, 15:01 last edited by
                            #19

                            first I had to resintall the Zip file instead of the tarball and I got a little further. It didn't like my -verbose so I took that out.

                            Then I ran it again and I got:
                            make.exe - Unable to Locate Component
                            This application has failed to start because msys-1.0.dll was not found. Re-installing the application may fix this problem.

                            What does msys have to do with all of this?

                            Also I am not going down to qtbase. I am calling this from the qt_src level.

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              Mr_Ada
                              wrote on 23 Oct 2013, 15:09 last edited by
                              #20

                              so I cleaned up my PATH so only the one mingw toolchain was visible (Qt's).

                              Ran again and got this:

                              C:\qt_src>configure -prefix C:\Qt5d -debug -developer-build -opensource -confirm-license -static -platform cygwin-g++ -qt-zlib -qt-libpng -qt-libjpeg

                              • cd qtbase
                              • C:\qt_src\qtbase\configure.bat -prefix C:\Qt5d -debug -developer-build -opensource -confirm-license -static -platform cygwin-g++ -qt-zlib -qt-libpng -qt-libjpeg

                              This is the Qt for Windows Open Source Edition.

                              You have already accepted the terms of the license.

                              Creating qmake...
                              Cleaning qmake failed, return code -1

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                Mr_Ada
                                wrote on 23 Oct 2013, 15:10 last edited by
                                #21

                                duh! I still have cygwin in there!!!!

                                changed to win32-g++

                                seems to be compiling...

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  Mr_Ada
                                  wrote on 23 Oct 2013, 15:24 last edited by
                                  #22

                                  got this:
                                  Running configuration tests...
                                  WARNING: The DirectX SDK could not be detected:
                                  There is no Direct X SDK installed or the environment variable "DXSDK_DIR" is not set.
                                  Disabling the ANGLE backend.

                                  WARNING: Using OpenGL ES 2.0 without ANGLE.
                                  Specify -opengl desktop to use Open GL.
                                  The build will most likely fail.

                                  config info...

                                  then it said to:
                                  Qt is now configured for building. Just run mingw32-make.

                                  This doesn't exist in the tool chain. neither does make.
                                  chris

                                  1 Reply Last reply
                                  0
                                  • J Offline
                                    J Offline
                                    JKSH
                                    Moderators
                                    wrote on 23 Oct 2013, 15:36 last edited by
                                    #23

                                    You have two choices:

                                    • Install the DirectX SDK, or
                                    • Add "-opengl desktop" to your configuration flags (your graphics card drivers needs to support OpenGL 2.0 or newer).

                                    In either case, make sure you clean your source tree first and the re-configure.

                                    If you're using the copy of MinGW that came with Qt 5.1, then mingw32-make should be in the 'bin' folder together with g++

                                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      Mr_Ada
                                      wrote on 24 Oct 2013, 02:38 last edited by
                                      #24

                                      I added -opengl desktop and just did a make. Don't why it is compiling now but it is. I tried to re-configure but that didn't work but it is compiling which is a good sign!

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        Mr_Ada
                                        wrote on 24 Oct 2013, 02:59 last edited by
                                        #25

                                        Ok. it stopped compiling. Here is what it is complaining about:
                                        mingw32-make[4]: Entering directory 'C:/qt_src/qtbase/src/widgets'
                                        (set PATH=C:\qt_src\qtbase\lib;%PATH:)=^)%) & C:\qt_src\qtbase\bin\uic.exe dialogs\qfiledialog.ui -o ui_qfiledialog.h
                                        Makefile.Debug:647: recipe for target 'ui_qfiledialog.h' failed
                                        mingw32-make[4]: *** [ui_qfiledialog.h] Error 255
                                        mingw32-make[4]: Leaving directory 'C:/qt_src/qtbase/src/widgets'
                                        Makefile:34: recipe for target 'debug' failed
                                        mingw32-make[3]: *** [debug] Error 2
                                        mingw32-make[3]: Leaving directory 'C:/qt_src/qtbase/src/widgets'
                                        Makefile:411: recipe for target 'sub-widgets-make_first' failed
                                        mingw32-make[2]: *** [sub-widgets-make_first] Error 2
                                        mingw32-make[2]: Leaving directory 'C:/qt_src/qtbase/src'
                                        Makefile:41: recipe for target 'sub-src-make_first' failed
                                        mingw32-make[1]: *** [sub-src-make_first] Error 2
                                        mingw32-make[1]: Leaving directory 'C:/qt_src/qtbase'
                                        makefile:56: recipe for target 'module-qtbase-make_first' failed
                                        mingw32-make: *** [module-qtbase-make_first] Error 2

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          Mr_Ada
                                          wrote on 24 Oct 2013, 04:12 last edited by
                                          #26

                                          path issue!!! Doesn't like " " in the path!

                                          1 Reply Last reply
                                          0

                                          16/36

                                          23 Oct 2013, 14:46

                                          • Login

                                          • Login or register to search.
                                          16 out of 36
                                          • First post
                                            16/36
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved