Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - XTP and MSVC conformance mode
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

XTP and MSVC conformance mode

 Post Reply Post Reply
Author
Message
mnissl View Drop Down
Groupie
Groupie


Joined: 12 June 2018
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote mnissl Quote  Post ReplyReply Direct Link To This Post Topic: XTP and MSVC conformance mode
    Posted: 12 June 2018 at 6:08am
XTP 18.4.0 (and prior) does not compile having the MSVC conformance mode enabled (/permissive-, Visual Studio 15.7.3).

We would like our application to comply with the C++ standard, but XTP needs to do so as well.

Are there any plans to make XTP compatible?
Back to Top
Hurrain View Drop Down
Newbie
Newbie
Avatar

Joined: 12 June 2018
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hurrain Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2018 at 8:25am
I'm really curious about this as well. This is also one of the requirements we're going to need to fulfill sooner or later at our company.
Back to Top
mnissl View Drop Down
Groupie
Groupie


Joined: 12 June 2018
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote mnissl Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2018 at 4:06am
Back to Top
a.schoenle View Drop Down
Newbie
Newbie


Joined: 16 November 2018
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote a.schoenle Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2018 at 7:57am
Let me second this. It would be very important for us to at least compile our own sources with /permissive- enabled if they pull XTP headers. Could someone from Codejock at least hint to whether this is something you are considering in the forseeable future?

Back to Top
a.schoenle View Drop Down
Newbie
Newbie


Joined: 16 November 2018
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote a.schoenle Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2018 at 12:34pm
I got curious so I had a go at it. You can download a patch from here:

This will make the headers conforming and you should be able to compile a consumer with /permissive-.

Most of it was missing this in
this->method()
in classes with a template parameter as base and similarly missing Base:: in
Base::static_member_variable
in the same. I had to move some definitions and I had to create one extra function to avoid having to pull PaintManager in some Common header which started endless cycles.

I also started fixing some of the .cpp files to make the library compile with /permissive- but it got tedious. It seems like 90% of the remaining stuff is that
(test ? typeA : typeB)
no longer compiles if the two types can be implicitely converted into more than one common type, the use of
or
as a variable name and some missing headers. XTPToolTipContext.cpp pulls mshtml.h and thus it needs the /Zc:strictStrings- compiler option.

I would like to leave this to the CodeJock people and sincerely hope that they will incorporate this upstream so I will not have to redo it.

Back to Top
a.schoenle View Drop Down
Newbie
Newbie


Joined: 16 November 2018
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote a.schoenle Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2018 at 1:08pm
Was of course 18.5.0, not 16.5.0. Here are the patches including for 18.6.0:

Back to Top
a.schoenle View Drop Down
Newbie
Newbie


Joined: 16 November 2018
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote a.schoenle Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2018 at 5:16am
Try again.

18.6. now compiles with /permissive-. To apply go to the root folder and do
patch -p1 < path/to/patch/file.patch

For 18.5. the patch only makes the headers conforming and it is untested. The diff is done from "Sources", so you will have to go to root/Sources and do
patch -p1 < path/to/patch/file.patch
Also, you will have to add a line
struct IUnknown;
to stdafx.h before it pulls the windows headers.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.