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. qmake link error after delete qt-everywhere-src

qmake link error after delete qt-everywhere-src

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 398 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.
  • O Offline
    O Offline
    okoknotok
    wrote on last edited by okoknotok
    #1

    Hello everyone.

    I tried to build from source yesterday (running configure.bat with "-prefix "D:\qt""), and it succeeded. Both qmake and cmake work.

    But today I deleted the qt-everywhere-src folder(I placeed it in C:\) which is approximately 100+ GB, and then I got an error. I think it should link libs in D:\qt\xxxxx, but it didn't! (I created this demo project with QT VS tools and didn't change any options.)
    c46308c8-fb9f-4701-8ac2-2afde90380aa-image.png
    cbf2a3bd-baae-4d3c-b922-7f46171b91df-image.png

    I created a new project with cmake and set(CMAKE_PREFIX_PATH "D:\qt"), it still works!

    How can I fix this problem to let qmake links to the right libs?

    jsulmJ 1 Reply Last reply
    0
    • O okoknotok

      Hello everyone.

      I tried to build from source yesterday (running configure.bat with "-prefix "D:\qt""), and it succeeded. Both qmake and cmake work.

      But today I deleted the qt-everywhere-src folder(I placeed it in C:\) which is approximately 100+ GB, and then I got an error. I think it should link libs in D:\qt\xxxxx, but it didn't! (I created this demo project with QT VS tools and didn't change any options.)
      c46308c8-fb9f-4701-8ac2-2afde90380aa-image.png
      cbf2a3bd-baae-4d3c-b922-7f46171b91df-image.png

      I created a new project with cmake and set(CMAKE_PREFIX_PATH "D:\qt"), it still works!

      How can I fix this problem to let qmake links to the right libs?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @okoknotok Did you also do "make install" after building Qt?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      O 1 Reply Last reply
      0
      • jsulmJ jsulm

        @okoknotok Did you also do "make install" after building Qt?

        O Offline
        O Offline
        okoknotok
        wrote on last edited by
        #3

        @jsulm I remember I used "ninja install" or something like that. and it works when i use CMake to build new project. Only qmake links to wrong library folder. So I'm wondering if something is wrong with the configurations of my qmake.

        jsulmJ 1 Reply Last reply
        0
        • O okoknotok

          @jsulm I remember I used "ninja install" or something like that. and it works when i use CMake to build new project. Only qmake links to wrong library folder. So I'm wondering if something is wrong with the configurations of my qmake.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @okoknotok Did you try complete rebuild of your app:

          1. Delete build folder
          2. Run qmake
          3. Build

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          O 1 Reply Last reply
          0
          • jsulmJ jsulm

            @okoknotok Did you try complete rebuild of your app:

            1. Delete build folder
            2. Run qmake
            3. Build
            O Offline
            O Offline
            okoknotok
            wrote on last edited by okoknotok
            #5

            @jsulm Yes.

            I try to create a new project again. But I check Project | Properties | Configuration Properties | Linker | Command Line | All Options this time, and I find something interesting
            7480e4b0-2d16-4d3f-ab4e-85406c9ee9d6-image.png
            It links same libs from different folder!
            Then I check the Linker Input, I think I find the root of the problem.
            29076674-853a-4a39-906c-8e70058dfa82-image.png
            But Why? Where it inherits from? The Qt_LIBS Macro is autogenerated. How did it find C:\xxxxx? I only add a qt version for QT VS Tools in D:\xxxxx from very begining.

            UPDATE: I grep qt-everywhere-src in D:\qt, It is mainly found in *.prl and *.pri files.

            1 Reply Last reply
            0
            • O Offline
              O Offline
              okoknotok
              wrote on last edited by
              #6

              I grep qt-everywhere-src in D:\qt, It is mainly found in *.prl and *.pri files.
              So I check the content and compare it with offical release.
              bec25352-0b67-403c-9914-811b836d332b-image.png
              LEFT is installed using online-installer.
              RIGHT is my build.

              As you can see, The first line was intentionally deleted.
              Is this the root of the problem?

              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