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. How can i set <language conformance flag> like in Vs2017 ( /permissive/no)
QtWS25 Last Chance

How can i set <language conformance flag> like in Vs2017 ( /permissive/no)

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 1.1k 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.
  • Z Offline
    Z Offline
    Ziri
    wrote on last edited by
    #1

    I am trying to link Pytorch c++ frontend with Qt .
    With Vs2017 its works fine when setting language conformance flag to "no".

    How can i set this flag in Qt .pro file ?

    Thank you in advance.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2
      QMAKE_CXXFLAGS += /permissive/no
      

      (Z(:^

      1 Reply Last reply
      1
      • Z Offline
        Z Offline
        Ziri
        wrote on last edited by Ziri
        #3

        Tank you for your quick reply.
        I just tried it and got warning [:-1: warning: D9002 : ignoring unknown option '/permissive/no']

        I am intersted in setting this flag .

        0_1565760858770_conformanceMode.JPG

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

          Perhaps it should be /permissive- https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=vs-2019

          (Z(:^

          Z 1 Reply Last reply
          3
          • sierdzioS sierdzio

            Perhaps it should be /permissive- https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=vs-2019

            Z Offline
            Z Offline
            Ziri
            wrote on last edited by Ziri
            #5

            @sierdzio seems like it's enabled by default in MSVC2017 i don't know how to disable it in Qmake file .

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

              This might work:

              QMAKE_CXXFLAGS -= /permissive-
              

              (Z(:^

              Z 1 Reply Last reply
              2
              • sierdzioS sierdzio

                This might work:

                QMAKE_CXXFLAGS -= /permissive-
                
                Z Offline
                Z Offline
                Ziri
                wrote on last edited by
                #7

                @sierdzio I tried it ( no warnings ) but that doesn't seem to solve the problem. Maybe i am missing other points.

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  Ziri
                  wrote on last edited by
                  #8

                  Until now the only workaround i found is (using Qt inside VS2017) :

                  After Using "Qt Visual Studio Tools" and setting the project in VS 2017 with "language conformance NO"

                  I had to do :

                  #undef slots
                  #include <torch/torch.h>
                  #define slots Q_SLOTS

                  (Still not working with Qt creator/Qmake)

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

                    Hi,

                    Try adding:

                    CONFIG += no_keywords
                    

                    to your .pro file.

                    This will disable the Qt specific keywords like signal and slot. You have to then use Q_SLOT and friends in your 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

                    • Login

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