Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QProcess Compile Error with Visual Studio 2012
Qt 6.12 LTS is out! See what's new in the release blog

QProcess Compile Error with Visual Studio 2012

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.8k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    When attempting to compile my application I get an error in Windows 7 with VS2012 whereas QProcess is not defined. I traced it down to the define QT_NO_PROCESS found in qprocess.h. But when I try a simple main.cpp program with the following main.pro:

    CONFIG += qt
    QT += core widgets
    SOURCES = main.cpp

    it compliles and links fine. When I use the exact main.pro specification with the exception of additional .cpp and .h files I encounter the problem.

    I suspect qmake is finding something in one of my several headers or source files which causes QT_NO_PROCESS to be defined.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Remove:
      @
      CONFIG += qt
      @

      Add:
      @
      QT += core gui widgets
      @

      Have you compiled Qt yourself? Where and how does the compilation fail?

      (Z(:^

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I tried your suggested changes to the main.pro but same error occurs. I am using a prebuilt Qt distribution for Windows provided by my company IT department. BTW - this application compiles and links fine in Linux.

        Here is a snippet from the compiler error:

            "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe" -f Makefile.Release
            cl -c -nologo -Zm200 -O2 -MD -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWINRT -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DX64 -D__X64__ -D__x64__ -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DNDEBUG -I"..\..\include" -I"..\..\..\..\Qt\Qt5.2.0\5.2.0\msvc2012_64\include" -I"..\..\..\..\Qt\Qt5.2.0\5.2.0\msvc2012_64\include\QtWidgets" -I"..\..\..\..\Qt\Qt5.2.0\5.2.0\msvc2012_64\include\QtGui" -I"..\..\..\..\Qt\Qt5.2.0\5.2.0\msvc2012_64\include\QtANGLE" -I"..\..\..\..\Qt\Qt5.2.0\5.2.0\msvc2012_64\include\QtCore" -I"release" -I"..\..\..\..\Qt\Qt5.2.0\5.2.0\msvc2012_64\mkspecs\winrt-x64-msvc2012" -Forelease\ @C:\Users\gjv6417\AppData\Local\Temp\nm30F3.tmp
        

        mainwindow.cpp
        .\mainwindow.cpp(261) : error C2514: 'QProcess' : class has no constructors

        As I mentioned in my previous post, QT_NO_PROCESS does not get defined in Windows. My simple example works fine but the more complicated application which includes a wide-range of Qt classes does not.

        I did a detailed analysis of the compile arguments from both my simple program and the more complicated one and there are differences. That's why I maintain, something I am using or including in the complicated application is tripping up defining QT_NO_PROCESS.

        Thanks for your help.

        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
        • Unsolved