Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Unable to build a Qt project in command-line

Unable to build a Qt project in command-line

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 2.7k 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.
  • B Offline
    B Offline
    bharath144
    wrote on last edited by
    #1

    Hello there,

    I have a qt 'subdirs' project that I have created in QtCreator and have been able to build and deploy well. There is a need to automate the build. So I am attempting to build the same project from the command-line.

    I have Qt version 5.2.1 installed and I have been using the 64-bit msvc2012 version on windows 7.

    Qt is installed at C:\Qt\Qt5.2.1. I added C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\bin to PATH (for qmake.exe etc.,), I added C:\Qt\Qt5.2.1\Tools\QtCreator\bin to PATH (for jom.exe), I added the <VS-Install-location>\Common7\IDE (for mvs dependencies), <VS-Install-location>\VC\bin (for cl.exe etc.,).

    First I ran qmake.exe (which succeeded).

    When I run jom.exe (or nmake for that matter), I get an error

    fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory

    I know where stddef.h is location on my PC, but how do I enable jom.exe (or nmake) to be able to find it?

    Regards,
    Bharath

    Cheers!
    ಮೈ ಗೋ ಭರತ ನಾರಾಯಣ
    Bharath Narayan M G

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

      Hi,

      You should either start from a Qt command line or at least from a Visual Studio command line. Otherwise there are batch files that you can call to setup the environment for you.

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

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bharath144
        wrote on last edited by
        #3

        Hi,

        Thanks for the response. I get what you are saying. I am running Qt5.2.1 and I unable to find that (batch) script which will setup the environment for me. Can you tell me where I can find it?

        Cheers!
        Bharath

        Cheers!
        ಮೈ ಗೋ ಭರತ ನಾರಾಯಣ
        Bharath Narayan M G

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bharath144
          wrote on last edited by
          #4

          Hi,

          I figured it out. I had to run the vcvarsall.bat script with 'x64' as the argument and setup the the other path variables.

          Thanks for your help.

          Cheers!
          Bharath

          Cheers!
          ಮೈ ಗೋ ಭರತ ನಾರಾಯಣ
          Bharath Narayan M G

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

            Good !

            Then please update the thread title prepending [solved] so other forum users may know a solution has been found :)

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

            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