Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to configure Qt to make it work with the VS2015 command Prompt
Forum Updated to NodeBB v4.3 + New Features

How to configure Qt to make it work with the VS2015 command Prompt

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 3 Posters 1.5k 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.
  • M Offline
    M Offline
    Mohamed Fouzi
    wrote on last edited by
    #1

    Hello everyone !
    Can you please help me to set up Qt to work with Visual Studio command prompt.
    I've followed the instructions from the Qt Library, but they aren't so clear, and for some others tutorial, i didn't found the same "directories" to set up everything. (For example, i don't have the Qbase directory)

    I'm using Qt 5.8.

    Thank you

    jsulmJ 1 Reply Last reply
    0
    • M Mohamed Fouzi

      Hello everyone !
      Can you please help me to set up Qt to work with Visual Studio command prompt.
      I've followed the instructions from the Qt Library, but they aren't so clear, and for some others tutorial, i didn't found the same "directories" to set up everything. (For example, i don't have the Qbase directory)

      I'm using Qt 5.8.

      Thank you

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

      @Mohamed-Fouzi What exactly is the problem?
      Did you install Qt for VS2015?
      When you installed VS2015 did you install C++ tools as well?

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

      1 Reply Last reply
      1
      • M Offline
        M Offline
        Mohamed Fouzi
        wrote on last edited by
        #3

        Well, i did. I installed both of them.
        Where i'm getting issues, is that i have a c++ code, that in order to make it executable, i have to compile it with the "msvc command prompt", so, when i create a Qt project containing those c/c++ files, i tried to compile in the command prompt with the following command :
        cl.exe /I "path to include files" /M /Ehsrc outputFile.exe main.cpp mainwindow.cpp zcl.lib
        where the zcl.lib is the library for the c++ project.
        This gave me errors like : cannot open QMainWindow : file not found..
        So, basically, i thought the compiling msvc "command prompt", didn't know the Qt library, this is why i concluded i have to set that manually.

        But,

        jsulmJ 1 Reply Last reply
        0
        • M Mohamed Fouzi

          Well, i did. I installed both of them.
          Where i'm getting issues, is that i have a c++ code, that in order to make it executable, i have to compile it with the "msvc command prompt", so, when i create a Qt project containing those c/c++ files, i tried to compile in the command prompt with the following command :
          cl.exe /I "path to include files" /M /Ehsrc outputFile.exe main.cpp mainwindow.cpp zcl.lib
          where the zcl.lib is the library for the c++ project.
          This gave me errors like : cannot open QMainWindow : file not found..
          So, basically, i thought the compiling msvc "command prompt", didn't know the Qt library, this is why i concluded i have to set that manually.

          But,

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

          @Mohamed-Fouzi If you use qmake then just do:

          qmake.exe project_name.pro
          nmake.exe
          

          in the command line (in the project directory) - don't call compiler directly. Probably you will need to provide the whole path to qmake.exe

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

          1 Reply Last reply
          2
          • M Offline
            M Offline
            Mohamed Fouzi
            wrote on last edited by
            #5

            Thank you for your answer.
            I did it, but the "nmake" command wasn't recognized

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

              Hi,

              What kind of terminal are you using to run that code ?

              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
              • M Mohamed Fouzi

                Thank you for your answer.
                I did it, but the "nmake" command wasn't recognized

                jsulmJ Online
                jsulmJ Online
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Mohamed-Fouzi You should use the command prompt from your Visual Studio installation (you can find it in the Start menu).

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

                1 Reply Last reply
                1

                • Login

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