Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. CMake error with msvc in CLion
Forum Updated to NodeBB v4.3 + New Features

CMake error with msvc in CLion

Scheduled Pinned Locked Moved Solved Qt 6
11 Posts 4 Posters 7.4k Views 2 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
    #2

    Hi,

    Your CMAKE_PREFIX_PATH should point to the "Qt/6.0.0/clang_64/lib/cmake" subdir.

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

    A 1 Reply Last reply
    1
    • SGaistS SGaist

      Hi,

      Your CMAKE_PREFIX_PATH should point to the "Qt/6.0.0/clang_64/lib/cmake" subdir.

      A Offline
      A Offline
      akshaybabloo
      wrote on last edited by
      #3

      @SGaist Apple is working fine actually. It's the MSVC part that is not working

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

        What do you get if you use a simple:

        find_package(Qt6 COMPONENTS Widgets)
        

        ?

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

        A 1 Reply Last reply
        0
        • SGaistS SGaist

          What do you get if you use a simple:

          find_package(Qt6 COMPONENTS Widgets)
          

          ?

          A Offline
          A Offline
          akshaybabloo
          wrote on last edited by
          #5

          @SGaist Tried it. Still same error

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

            Does it work with Qt Creator ?

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

            A 1 Reply Last reply
            0
            • Z Offline
              Z Offline
              zhangyiant
              wrote on last edited by
              #7

              I found CLion by default uses x86 as the Architecture for VS in the toolchains setting.

              I changed it to amd64, it works on my machine.

              You can try it.

              A R 2 Replies Last reply
              6
              • Z zhangyiant

                I found CLion by default uses x86 as the Architecture for VS in the toolchains setting.

                I changed it to amd64, it works on my machine.

                You can try it.

                A Offline
                A Offline
                akshaybabloo
                wrote on last edited by
                #8

                @zhangyiant How would you change that?

                Z 1 Reply Last reply
                0
                • SGaistS SGaist

                  Does it work with Qt Creator ?

                  A Offline
                  A Offline
                  akshaybabloo
                  wrote on last edited by
                  #9

                  @SGaist Yes, it did

                  1 Reply Last reply
                  0
                  • A akshaybabloo

                    @zhangyiant How would you change that?

                    Z Offline
                    Z Offline
                    zhangyiant
                    wrote on last edited by
                    #10

                    @akshaybabloo File->Settings->Build,Execution,Deployment->Toolchains

                    Select "Visual Studio", and you can see “Architecture" configuration.

                    My CLion is version 2020.3.1.

                    1 Reply Last reply
                    0
                    • Z zhangyiant

                      I found CLion by default uses x86 as the Architecture for VS in the toolchains setting.

                      I changed it to amd64, it works on my machine.

                      You can try it.

                      R Offline
                      R Offline
                      ruddy
                      wrote on last edited by
                      #11

                      @zhangyiant Thank you very much, I had such a problem too, it worked for me too.

                      1 Reply Last reply
                      1
                      • X xiaoyifang referenced this topic on

                      • Login

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