Unsolved How can i set <language conformance flag> like in Vs2017 ( /permissive/no)
-
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.
-
QMAKE_CXXFLAGS += /permissive/no
-
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 .
-
Perhaps it should be
/permissive-
https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=vs-2019 -
@sierdzio seems like it's enabled by default in MSVC2017 i don't know how to disable it in Qmake file .
-
This might work:
QMAKE_CXXFLAGS -= /permissive-
-
@sierdzio I tried it ( no warnings ) but that doesn't seem to solve the problem. Maybe i am missing other points.
-
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)
-
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.