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. QProcess with Qt5.9 and MVSC2017
QtWS25 Last Chance

QProcess with Qt5.9 and MVSC2017

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 5 Posters 5.0k 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.
  • A Offline
    A Offline
    Antoine Rauzy
    wrote on last edited by
    #1

    Hi All,
    I just re-installed Qt to get version 5.9.
    I'm trying to compile a program that uses QProcess(es).
    I get a compilation error "processenvironment" not available (both for 32 bits and 64 bits).
    When I compile my program with mingw, everything works fine.
    I was not able to find any documentation on this issue.
    Any idea where the problem comes from?
    Antoine

    jsulmJ 1 Reply Last reply
    0
    • A Antoine Rauzy

      Hi All,
      I just re-installed Qt to get version 5.9.
      I'm trying to compile a program that uses QProcess(es).
      I get a compilation error "processenvironment" not available (both for 32 bits and 64 bits).
      When I compile my program with mingw, everything works fine.
      I was not able to find any documentation on this issue.
      Any idea where the problem comes from?
      Antoine

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

      @Antoine-Rauzy Can you post the whole error message?

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

      1 Reply Last reply
      1
      • A Offline
        A Offline
        AndreyT
        wrote on last edited by AndreyT
        #3

        I'm getting exactly the same thing in VS2017. Compiling any file that includes <QProcess> results in an error message

        error C2338: Required feature processenvironment for file d:\development\qt\5.9\winrt_x64_msvc2017\include\qtcore\qprocess.h not available.
        

        This error message is actually generated by QT_REQUIRE_CONFIG (static_assert in disguise) in qprocess.h, which checks

        QT_REQUIRE_CONFIG(processenvironment);
        

        which in turn requires existence of QT_FEATURE_processenvironment in QtCore\qconfig.h. However, my qconfig.h does not define QT_FEATURE_processenvironment.

        What do we need to do to make it appear?

        jsulmJ D 2 Replies Last reply
        0
        • A AndreyT

          I'm getting exactly the same thing in VS2017. Compiling any file that includes <QProcess> results in an error message

          error C2338: Required feature processenvironment for file d:\development\qt\5.9\winrt_x64_msvc2017\include\qtcore\qprocess.h not available.
          

          This error message is actually generated by QT_REQUIRE_CONFIG (static_assert in disguise) in qprocess.h, which checks

          QT_REQUIRE_CONFIG(processenvironment);
          

          which in turn requires existence of QT_FEATURE_processenvironment in QtCore\qconfig.h. However, my qconfig.h does not define QT_FEATURE_processenvironment.

          What do we need to do to make it appear?

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

          @AndreyT You are building for WinRT. Is this on purpose?

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

          A 1 Reply Last reply
          2
          • A AndreyT

            I'm getting exactly the same thing in VS2017. Compiling any file that includes <QProcess> results in an error message

            error C2338: Required feature processenvironment for file d:\development\qt\5.9\winrt_x64_msvc2017\include\qtcore\qprocess.h not available.
            

            This error message is actually generated by QT_REQUIRE_CONFIG (static_assert in disguise) in qprocess.h, which checks

            QT_REQUIRE_CONFIG(processenvironment);
            

            which in turn requires existence of QT_FEATURE_processenvironment in QtCore\qconfig.h. However, my qconfig.h does not define QT_FEATURE_processenvironment.

            What do we need to do to make it appear?

            D Offline
            D Offline
            Devopia53
            wrote on last edited by
            #5

            @AndreyT

            Check out Qt's doc...
            Note: QProcess is not supported on VxWorks, iOS, tvOS, watchOS, or the Universal Windows Platform.

            1 Reply Last reply
            1
            • A Offline
              A Offline
              Antoine Rauzy
              wrote on last edited by
              #6

              That's right. The Universal Windows Platform is not supported.
              But in previous version of Qt and MSVC, it was.
              So the question is where this regression comes from and more importantly, does it mean that QProcess(es) won't be supported in any subsequent versions of Qt and/or MSVC?

              1 Reply Last reply
              0
              • jsulmJ jsulm

                @AndreyT You are building for WinRT. Is this on purpose?

                A Offline
                A Offline
                AndreyT
                wrote on last edited by
                #7

                @jsulm said in QProcess with Qt5.9 and MVSC2017:

                @AndreyT You are building for WinRT. Is this on purpose?

                Realized my mistake, thank you. Apparently I installed wrong platform/version of Qt.

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

                  @Antoine-Rauzy That's the point: UWP is not the same thing as MSVC although they use the same IDE, it's not the same platform.

                  So to sum up:

                  1. QProcess works on Windows like it always did when building for the Windows platform be it with MSVC or MinGW.
                  2. QProcess is not available on UWP because the WinRT platform doesn't support that concept, it has nothing to do with Qt.

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

                  A 1 Reply Last reply
                  2
                  • SGaistS SGaist

                    @Antoine-Rauzy That's the point: UWP is not the same thing as MSVC although they use the same IDE, it's not the same platform.

                    So to sum up:

                    1. QProcess works on Windows like it always did when building for the Windows platform be it with MSVC or MinGW.
                    2. QProcess is not available on UWP because the WinRT platform doesn't support that concept, it has nothing to do with Qt.
                    A Offline
                    A Offline
                    Antoine Rauzy
                    wrote on last edited by
                    #9

                    @SGaist Thank you so much for these explanations.
                    I have an additional naive question:
                    Why the configuration kit manager does not propose a default configuration to compile the Qt project with MSVC but without targeting UWP?
                    It is not at all obvious that such a possibility exists.

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

                      Because you are using a Qt version built for UWP. If you want to target standard Windows, you have to use the classic Qt for MSVC.

                      Again, that's nothing Qt specific, the two platforms are different so they have different requirements and you can't just switch compilers.

                      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
                      1

                      • Login

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