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. The C Compiler is not able to compile a simple test program!
Forum Updated to NodeBB v4.3 + New Features

The C Compiler is not able to compile a simple test program!

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 6.6k 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.
  • N Offline
    N Offline
    Nima Ghorab
    wrote on last edited by
    #1

    Hello guys!
    I came across with a problem!
    I created a simple C++ project in Qt and I wanted to use CMake as its build tool and MSVC 2017 64bit kit.
    But as I show in image below, CMake says The C Compiler is not able to compile a simple test program!
    I tried many ways and searched a lot with no luck!
    This is the error:
    0_1548945981026_39a8de70-b9b2-425c-843e-6f2f1782b588-image.png
    Can anyone point me to right direction?
    Really thanks!

    aha_1980A 1 Reply Last reply
    0
    • N Nima Ghorab

      Hello guys!
      I came across with a problem!
      I created a simple C++ project in Qt and I wanted to use CMake as its build tool and MSVC 2017 64bit kit.
      But as I show in image below, CMake says The C Compiler is not able to compile a simple test program!
      I tried many ways and searched a lot with no luck!
      This is the error:
      0_1548945981026_39a8de70-b9b2-425c-843e-6f2f1782b588-image.png
      Can anyone point me to right direction?
      Really thanks!

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @Nima-Ghorab,

      from the output it is visible that jom cannot be called. Can you check that you actually have this program on your harddisk, and where?

      Qt has to stay free or it will die.

      N 2 Replies Last reply
      2
      • aha_1980A aha_1980

        Hi @Nima-Ghorab,

        from the output it is visible that jom cannot be called. Can you check that you actually have this program on your harddisk, and where?

        N Offline
        N Offline
        Nima Ghorab
        wrote on last edited by Nima Ghorab
        #3

        Dear @aha_1980 thank you so much for your answer.
        Where this jom should be located? in MSVC installation path?

        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #4

          Tools->Options->Kits->select the kit you are using->click change in CMake Configuration->add the path to jom to the CMAKE_PREFIX_PATH. It should be something like CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX};C:/Qt/Tools/QtCreator/bin

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          3
          • aha_1980A aha_1980

            Hi @Nima-Ghorab,

            from the output it is visible that jom cannot be called. Can you check that you actually have this program on your harddisk, and where?

            N Offline
            N Offline
            Nima Ghorab
            wrote on last edited by
            #5

            Dear @aha_1980 I find jom in my Qt installation directory: E:\Softwares\Qt\Tools\QtCreator\bin.

            Dear @VRonin thank you so much for your answer.
            I check that and this is mine: CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
            Should I change this to something like : CMAKE_PREFIX_PATH:STRING=E:\Softwares\Qt\Tools\QtCreator\bin ?

            1 Reply Last reply
            0
            • VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by VRonin
              #6

              CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX};E:/Softwares/Qt/Tools/QtCreator/bin

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              N 1 Reply Last reply
              1
              • VRoninV VRonin

                CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX};E:/Softwares/Qt/Tools/QtCreator/bin

                N Offline
                N Offline
                Nima Ghorab
                wrote on last edited by Nima Ghorab
                #7

                @VRonin Thanks but it doesn't fix the problem.
                Still get the same error!

                Edit: adding E:\Softwares\Qt\Tools\QtCreator\bin to path and then restart Qt Creator solve the problem!
                Thank you so much guys for your helps.

                1 Reply Last reply
                2

                • Login

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