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 in windows?
Qt 6.11 is out! See what's new in the release blog

Qmake in windows?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.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.
  • C Offline
    C Offline
    CroCo
    wrote on last edited by
    #1

    I'm using qmake and everything works perfectly. In windows, I typed

    qmake -o Makefile hello.pro
    This line generates the following files
    debug (folder)
    release (folder)
    Makefile
    Makefile.Debug
    Makefile.

    I don't want to create an independent folder for debug nor release . My question is that how can I generate executable file in the current directory of my project. This is my hello.pro
    @
    QT += core

    greaterThan(QT_MAJOR_VERSION, 4): QT +=widgets

    CONFIG += debug
    CONFIG -= release
    TARGET = test
    TEMPLATE = app
    SOURCES += main.cpp
    @

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MarianMMX
      wrote on last edited by
      #2

      @mkdir bin
      cd bin
      qmake ..\hello.pro
      nmake@

      All the compiler generated files will be in bin folder.
      Keep the source code folder clean.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        t3685
        wrote on last edited by
        #3

        I believe you can use the option DESTDIR

        1 Reply Last reply
        0
        • C Offline
          C Offline
          CroCo
          wrote on last edited by
          #4

          @MarlanMMX,
          Thanks for the advice. I'm stilling getting the folders inside bin folder. Is there a command in qmake for not generating these folders? I'm happy with bin folder.

          @t3685,
          Thanks for the advice. What is DESTDIR? and how can I use it?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            t3685
            wrote on last edited by
            #5

            You can find more information here:

            https://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#destdir
            https://qt-project.org/doc/qt-5.1/qmake/qmake-advanced-usage.html

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MarianMMX
              wrote on last edited by
              #6

              Go to
              QT-DIR\mkspecs(compiler)
              (ex., if you use Visual C++ 2010 QT-DIR\mkspecs\win32-msvc2010\ )
              copy qmake.conf to qmake.conf.bak
              open qmake.conf, find (line 9)
              @CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe@
              remove debug_and_release debug_and_release_target, and save the file.
              Delete files in project bin folder and run qmake again.

              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