Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Solved]I can't compile Qt5.1 on windows 7. :/



  • Hi everyone, I'm new here.
    I like Qt and I use it for my RPG project, Qt 4.8 was perfect but now I changed my version of mingw to have the support of std::thread, thanks to this website who gives me the right link for the mingw installation.

    But, I've a problem, I need to compile Qt5.1, for the support of MySQL, but, when I launch the configure script, I got this error message :

    • cd qtbase
    • C:\qt-everywhere-opensource-src-5.1.0\qtbase\configure
      'C:\qt-everywhere-opensource-src-5.1.0\qtbase\configure.exe' is not reconized as an internal or external command, an executable program or command's file.

    Is it normal that there are 2 \ between qtbase and configure.exe ?

    Thanks for your help.



  • [quote author="Lo-X" date="1375000585"]+ cd qtbase

    • C:\qt-everywhere-opensource-src-5.1.0\qtbase\configure
      'C:\qt-everywhere-opensource-src-5.1.0\qtbase\configure.exe' is not reconized as an internal or external command, an executable program or command's file.
      [/quote]

    Seems like that you have an issue with the path. Make sure that you have downloaded the "Qt 5.1 zip":http://download.qt-project.org/official_releases/qt/5.1/5.1.0/single/qt-everywhere-opensource-src-5.1.0.zip. After that extracted it, enter exactly its location and execute configure.exe. You can always use the dir command in Windows shell to list all existing files in a directory and to make sure that configure.exe is at the desired location.


  • Moderators

    [quote author="Lo-X" date="1375000585"]Is it normal that there are 2 \ between qtbase and configure.exe ?[/quote]No, it's not.

    Make sure you:

    Use cmd.exe, not MSYS

    Call configure.bat in the root directory (C:\qt-everywhere-opensource-src-5.1.0\configure.bat), NOT inside qtbase



  • I've dowloaded the .zip and it works better.
    But know i've an error while compiling.
    I followed this thread : "Ici":http://www.qtfr.org/viewtopic.php?id=1609

    But, when I run mingw32-make I get this error :

    "Image here ":http://www.hostingpics.net/viewer.php?id=881120compilingqtproblem.jpg


  • Moderators

    It looks like the build system doesn't support spaces in your library path. "Program Files (x86)" has 2 spaces, so it thinks you have 3 files:

    • C:\Program
    • Files
    • (x86)\amzi\amzi_7-6-9\lib

    Install amzi into a location with no spaces and try again.



  • Ok I changed amzi location, and the AMZI_DIR environment var.

    But now i get a new error when I want to compile the mysql plugin for window :

    Unable to find file for inclusion qt_plugin



  • I solved it, there's an error in the path, then, I had to specify the absolute path for running qmake.



  • The compilation is too long, is there an other way to activate the mysql-driver without recompiling the entire framework ?


  • Lifetime Qt Champion

    Hi,

    If you already have a Qt built, you can follow the instructions "here":http://qt-project.org/doc/qt-5.0/qtsql/sql-driver.html#qmysql without recompiling all of Qt



  • No, I havent a Qt build, the Qt build that I've downloaded don't work, I have undefined references to the .lib files.


  • Lifetime Qt Champion

    What version did you download and what errors do you get ?



  • Qt 5.1.0 and I get a lot of undefined reference error, I use code::blocks and it seams it doesn't find the .lib files, but, I prefer work with static link (.a files.), with Qt 4.7 I've .a instead of .lib files and it worked.
    But with Qt 5.1 build It's .lib files...

    I've a question, how can I desactivate the jsbackend for qt compilation, it didn't work...


  • Lifetime Qt Champion

    What package did you install ? There are several downloads available, MinGW and Visual Studio.

    Which one did you install for Qt 4.7 ?



  • Ha yeah, in fact, I picked the wrong download but now some dll are missing like icuin51.dll, where can I find this dll files ?



  • I found it!
    It was in the bin directory of qt.
    Even windows didn't find it hahaha.

    now, it run. ^^


  • Lifetime Qt Champion

    Great !

    Don't forget to update the thread's title to solved so other forum users may know a solution has been found :)



  • I got the same error as the originator of this thread did and there isn't enough here to get it to work for me. I am guessing I have a path issue. What should be in the path to make this script happy?


  • Moderators

    Hi,

    [quote author="Mr_Ada" date="1382505300"]I got the same error as the originator of this thread did and there isn't enough here to get it to work for me. I am guessing I have a path issue. What should be in the path to make this script happy?[/quote]We'll need more details about your environment and what you've tried so far.



  • I am running Windows XP64 and using a CMD shell I got to the first error mentioned above.

    I have tried to work with a CYGWIN build but that wasn't good either. What I am trying to do is get some debug static libs so that I can traverse through Qt code. I am writing Ada bindings and have had mixed success with my bindings. Some objects display, some dont.


  • Moderators

    CMD shell using what tools? Where did you get those tools from? Where did you get the source code from? What's in your PATH?

    I'd imagine that you'll have better luck if you keep trying with a native build, rather than a Cygwin build which adds an extra layer of complexity.



  • I tried using Qt's MinGW compiler. I also tried to get Windows SDK but they don't provide one for XP64.


Log in to reply