Compiling QT5.1 for prefix folder problem ---- building package relies on the prefix folder??



  • Hi guys,
    I am new to QT, and compiling the QT5.1 with the prebuilt package ICU and OpenSSL. Here is my building parameters:
    @configure -ltcg -confirm-license -opensource -platform win32-msvc2010 -debug-and-release -prefix "D:\QT\5.1.0_vc2010_x64" -qt-sql-sqlite -qt-sql-odbc -plugin-sql-sqlite -plugin-sql-odbc -qt-zlib -qt-libpng -qt-libjpeg -opengl desktop -qt-freetype -no-angle -nomake tests -nomake examples -nomake demos -mp -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32"@
    Then I use the nmake and nmake install commands, it works perfectly on building and installing process. I test the code I bulit on VS2010 with VSAddin, the code also works fine.
    However, then I met a problem on renaming the prefix folder name 5.1.0_vc2010_x64. If I changd the prefix folder name 5.1.0_vc2010_x64, such as 5.1.0_vc2010_x64_openssl, the package I built will fail even I can not open the *assistant.exe * as well as the other exe file in the bin folder. But when I renamed the folder name 5.1.0_vc2010_x64_openssl back to the 5.1.0_vc2010_x64, everything work fine as usual. One more thing, moveing this folder 5.1.0_vc2010_x64 to another folder will cause the same problem. Even more, the test code I bulid also relies on the prefix folder.
    I wonder if QT5.1 relies on the prefix folder? Then how can I move or change the name of this folder with QT5.1 working fine on another computer.
    Can anyone help me to solve this issue? Thanks.


  • Moderators

    Paths are hard-coded into Qt libraries during compilation. You need to either use qt.conf file to override those, or recompile.



  • [quote author="sierdzio" date="1375630729"]Paths are hard-coded into Qt libraries during compilation. You need to either use qt.conf file to override those, or recompile.[/quote]

    Hi sierdzio;
    Can you give some more advices or tuitions ?
    How can I recompile QT to avoid this issue or editing the qt.conf ?
    I wish you could give me more details.
    Thanks.


  • Moderators

    You cannot recompile to "avoid this issue": you can recompile with a different (renamed) prefix so that it all works in new location. But if you then rename the output folder again - it will stop working just like it did now.

    As for qt.conf - please consult "the documentation":http://qt-project.org/doc/qt-4.8/qt-conf.html. In general, it's enough to put qt.conf file inside your <>build dir/bin directory (the one containing qmake):
    @
    [Paths]
    Prefix=/path/to/your/renamed/qt
    @



  • [quote author="sierdzio" date="1375631624"]You cannot recompile to "avoid this issue": you can recompile with a different (renamed) prefix so that it all works in new location. But if you then rename the output folder again - it will stop working just like it did now.

    As for qt.conf - please consult "the documentation":http://qt-project.org/doc/qt-4.8/qt-conf.html. In general, it's enough to put qt.conf file inside your <>build dir/bin directory (the one containing qmake):
    @
    [Paths]
    Prefix=/path/to/your/renamed/qt
    @[/quote]

    Thank you very much for your kind help. I read the tuition and fix it out.


  • Moderators

    You are welcome, and happy coding!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.