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. Compiling QT5.1 for prefix folder problem ---- building package relies on the prefix folder??
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 2 Posters 3.2k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    crazyi
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

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

      (Z(:^

      1 Reply Last reply
      0
      • C Offline
        C Offline
        crazyi
        wrote on last edited by
        #3

        [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.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          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
          @

          (Z(:^

          1 Reply Last reply
          0
          • C Offline
            C Offline
            crazyi
            wrote on last edited by
            #5

            [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.

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              You are welcome, and happy coding!

              (Z(:^

              1 Reply Last reply
              0

              • Login

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