Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. After moving project folder into a different path, QT keeps looking for files to include into the old path.
Forum Updated to NodeBB v4.3 + New Features

After moving project folder into a different path, QT keeps looking for files to include into the old path.

Scheduled Pinned Locked Moved Solved General and Desktop
19 Posts 6 Posters 2.6k Views 3 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    Hi,

    Check if you have any hidden files starting with a . in your sources and build folders.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    mvreenvM 1 Reply Last reply
    0
    • SGaistS SGaist

      Hi,

      Check if you have any hidden files starting with a . in your sources and build folders.

      mvreenvM Offline
      mvreenvM Offline
      mvreenv
      wrote on last edited by
      #5

      @SGaist there's a .qmake.stash file in the build folder but I doubt that's the problem, as its contents are:

      QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
      QMAKE_CXX.QMAKE_MSC_VER = 1916
      QMAKE_CXX.QMAKE_MSC_FULL_VER = 191627045
      QMAKE_CXX.COMPILER_MACROS =
      QT_COMPILER_STDCXX
      QMAKE_MSC_VER
      QMAKE_MSC_FULL_VER
      QMAKE_CXX.INCDIRS =
      "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\include"
      "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include"
      "C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um"
      "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt"
      "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared"
      "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um"
      "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt"
      "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt"
      QMAKE_CXX.LIBDIRS =
      "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64"
      "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x64"
      "C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64"
      "C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64"
      "C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64"

      JonBJ 1 Reply Last reply
      0
      • mvreenvM mvreenv

        @SGaist there's a .qmake.stash file in the build folder but I doubt that's the problem, as its contents are:

        QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
        QMAKE_CXX.QMAKE_MSC_VER = 1916
        QMAKE_CXX.QMAKE_MSC_FULL_VER = 191627045
        QMAKE_CXX.COMPILER_MACROS =
        QT_COMPILER_STDCXX
        QMAKE_MSC_VER
        QMAKE_MSC_FULL_VER
        QMAKE_CXX.INCDIRS =
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\include"
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include"
        "C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um"
        "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt"
        "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared"
        "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um"
        "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt"
        "C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt"
        QMAKE_CXX.LIBDIRS =
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64"
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x64"
        "C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64"
        "C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64"
        "C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64"

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #6

        @mvreenv
        At this point I would try to find where that"old" string might be being picked up from. What about something like:

        cd C:/builds/starlab
        findstr /s/i UNIPI *.*
        

        ?

        mvreenvM 1 Reply Last reply
        0
        • JonBJ JonB

          @mvreenv
          At this point I would try to find where that"old" string might be being picked up from. What about something like:

          cd C:/builds/starlab
          findstr /s/i UNIPI *.*
          

          ?

          mvreenvM Offline
          mvreenvM Offline
          mvreenv
          wrote on last edited by
          #7

          @JonB I tried this and it doesn't find any matches. I tried running qmake on another repository (https://github.com/taiya/starlab-mcfskel) that adds to starlab and it gives the same error, at this point I think the problem probably lies inside qmake

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mchinand
            wrote on last edited by
            #8

            It looks like the .pro project files reference the .prf files relative to PWD variable which seems fine (see example below). All the references to .prf files don't use 'qmake -set ...' but for those that do, you can check what those variables get set to.

            44e03c9e-2905-4ed1-b0a4-2d74547494ba-image.png

            mvreenvM 1 Reply Last reply
            0
            • M mchinand

              It looks like the .pro project files reference the .prf files relative to PWD variable which seems fine (see example below). All the references to .prf files don't use 'qmake -set ...' but for those that do, you can check what those variables get set to.

              44e03c9e-2905-4ed1-b0a4-2d74547494ba-image.png

              mvreenvM Offline
              mvreenvM Offline
              mvreenv
              wrote on last edited by
              #9

              @mchinand I tried doing this

              message($$PWD)
              system(qmake -set STARLAB       $$PWD/starlab.prf)
              message($$[STARLAB])
              

              and I get this

              Project MESSAGE: C:/builds/starlab/core
              Project MESSAGE: C:/Users/marin/Documents/UNIPI/TESI/Workspace/starlab/core/starlab.prf
              

              The PWD value goes back to the old path when there's "qmake -set"

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mchinand
                wrote on last edited by mchinand
                #10

                I've never used the -set option of qmake but looks like it makes the settings persist between calls. It seems like it should update the variables when you call it again. Run the following and see if your (old) paths are there.

                qmake -query

                I don't see a way to unset variables (I would have thought setting it again would overwrite it). The documentation says these values are stored in a QSettings but I'm not sure where exactly (probably somewhere in your AppData folder somewhere) What version of Qt are you using? Perhaps upgrade to a newer version. You may want to replace those qmake -set lines with just plain variable assignments but you may have it in additional files. Maybe moving all the qmake -set calls to your top-level .pro file will help.

                mvreenvM 1 Reply Last reply
                0
                • M mchinand

                  I've never used the -set option of qmake but looks like it makes the settings persist between calls. It seems like it should update the variables when you call it again. Run the following and see if your (old) paths are there.

                  qmake -query

                  I don't see a way to unset variables (I would have thought setting it again would overwrite it). The documentation says these values are stored in a QSettings but I'm not sure where exactly (probably somewhere in your AppData folder somewhere) What version of Qt are you using? Perhaps upgrade to a newer version. You may want to replace those qmake -set lines with just plain variable assignments but you may have it in additional files. Maybe moving all the qmake -set calls to your top-level .pro file will help.

                  mvreenvM Offline
                  mvreenvM Offline
                  mvreenv
                  wrote on last edited by mvreenv
                  #11

                  @mchinand the -set option was used in the repository I cloned.

                  I tried running system(qmake -query) but it doesn't show anything in the output.

                  I looked into the <user>\AppData\Roaming\QtProject\ and there's a QtCreator.ini file but it only stores information for the configuration of Qt Creator.

                  So I tried adding this after all the system(qmake -set) calls:

                  for(var, $$list($$enumerate_vars())) {
                      message($$var)
                      message($$eval($$var))
                  }
                  

                  and got the value of QMAKESPEC which is "A system variable that contains the full path of the qmake configuration that is used when generating Makefiles. The value of this variable is automatically computed." (https://doc.qt.io/qt-5/qmake-variable-reference.html#qmakespec). I then followed the path and opened the qmake.conf file found there but it doesn't store any of the set values with the system(qmake -set) calls.

                  With the listing of all the variables and their value I got this:

                  PWD = C:/builds/starlab/core
                  OUT_PWD =  C:/builds/starlab/core
                  _PRO_FILE_PWD_ = C:/builds/starlab/core
                  

                  And when I try to search for "STARLAB" or "EIGENPATH" (which should've been set to something) in the output there are no results. I also tried searching for the old path but still no results.

                  I am using Qt 5.12.12, which I also uninstalled and reinstalled to try and solve this problem, with no success.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    Since it's Windows, take a look at the registry.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    mvreenvM 1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mchinand
                      wrote on last edited by mchinand
                      #13

                      You can do it outside of your project file. Here's a test I did:

                      C:\Qt\5.14.2\msvc2017_64\bin> .\qmake -set ASDFTESTVARIABLE XYZ
                      C:\Qt\5.14.2\msvc2017_64\bin> .\qmake -query
                      ASDFTESTVARIABLE:XYZ
                      QT_SYSROOT:
                      QT_INSTALL_PREFIX:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_ARCHDATA:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_DATA:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_DOCS:C:/Qt/Docs/Qt-5.14.2
                      ...
                      
                      C:\Qt\5.14.2\msvc2017_64\bin> .\qmake -set ASDFTESTVARIABLE ABC
                      C:\Qt\5.14.2\msvc2017_64\bin> .\qmake -query
                      ASDFTESTVARIABLE:ABC
                      QT_SYSROOT:
                      QT_INSTALL_PREFIX:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_ARCHDATA:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_DATA:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_DOCS:C:/Qt/Docs/Qt-5.14.2
                      ...
                      

                      And there is a qmake -unset option

                      C:\Qt\5.14.2\msvc2017_64\bin> .\qmake -unset ASDFTESTVARIABLE
                      C:\Qt\5.14.2\msvc2017_64\bin> .\qmake -query
                      QT_SYSROOT:
                      QT_INSTALL_PREFIX:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_ARCHDATA:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_DATA:C:/Qt/5.14.2/msvc2017_64
                      QT_INSTALL_DOCS:C:/Qt/Docs/Qt-5.14.2
                      
                      1 Reply Last reply
                      1
                      • SGaistS SGaist

                        Since it's Windows, take a look at the registry.

                        mvreenvM Offline
                        mvreenvM Offline
                        mvreenv
                        wrote on last edited by
                        #14

                        @SGaist the values that were set with qmake -set and had the old path were indeed in the windows registry, under Computer\HKEY_CURRENT_USER\SOFTWARE\QtProject\QMake.

                        I deleted them and it seems to have fixed the issue. Thank you all!

                        M 1 Reply Last reply
                        0
                        • mvreenvM mvreenv

                          @SGaist the values that were set with qmake -set and had the old path were indeed in the windows registry, under Computer\HKEY_CURRENT_USER\SOFTWARE\QtProject\QMake.

                          I deleted them and it seems to have fixed the issue. Thank you all!

                          M Offline
                          M Offline
                          mchinand
                          wrote on last edited by
                          #15

                          I just edited my recent reply, there is an qmake -unset option that removes the variable. Removing it in the Registry certainly works though too.

                          mvreenvM 1 Reply Last reply
                          0
                          • M mchinand

                            I just edited my recent reply, there is an qmake -unset option that removes the variable. Removing it in the Registry certainly works though too.

                            mvreenvM Offline
                            mvreenvM Offline
                            mvreenv
                            wrote on last edited by
                            #16

                            @mchinand yeah I already had deleted them when I saw your reply, good to know about qmake -unset for the future, thank you!

                            1 Reply Last reply
                            1
                            • mvreenvM Offline
                              mvreenvM Offline
                              mvreenv
                              wrote on last edited by
                              #17

                              And now I have another issue, after deleting the windows registry variables with regedit, it doesn't seem like qmake is able to initialise and assign them. After the qmake -set calls if I write this in the core.pro file

                              message($$PWD)
                              message($$[STARLAB])
                              message($$[NANOFLANN])
                              

                              I get this output:

                              Project MESSAGE: C:/builds/starlab/core
                              Project MESSAGE: 
                              Project MESSAGE: 
                              

                              And even by running qmake.exe -query in C:\Qt\5.12.12\msvc2017_64\bin the variables don't show up.

                              1 Reply Last reply
                              0
                              • mvreenvM Offline
                                mvreenvM Offline
                                mvreenv
                                wrote on last edited by mvreenv
                                #18

                                I resolved the issue by manually setting the variables with qmake in commad line in the C:\Qt\5.12.12\msvc2017_64\bin folder and checking in the Windows Registry if they were correctly initialised.

                                Z 1 Reply Last reply
                                1
                                • mvreenvM mvreenv

                                  I resolved the issue by manually setting the variables with qmake in commad line in the C:\Qt\5.12.12\msvc2017_64\bin folder and checking in the Windows Registry if they were correctly initialised.

                                  Z Offline
                                  Z Offline
                                  zahra_Kh
                                  wrote on last edited by
                                  #19

                                  @mvreenv hi Were you able to implement the 3D shape skeleton?
                                  I also have problems in this field, I can ask you for help
                                  qt2.PNG

                                  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