Print Page | Close Window

XTP and MSVC conformance mode

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
Printed Date: 27 June 2019 at 4:43am

Topic: XTP and MSVC conformance mode
Posted By: mnissl
Subject: XTP and MSVC conformance mode
Date 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?

Posted By: Hurrain
Date 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.

Posted By: mnissl
Date Posted: 03 July 2018 at 4:06am
Just in case nobody has a clue what I'm talking about:

http://" rel="nofollow - http://

http://" rel="nofollow - http://

Posted By: a.schoenle
Date 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?

Posted By: a.schoenle
Date Posted: 16 November 2018 at 12:34pm
I got curious so I had a go at it. You can download a patch from here:" rel="nofollow -

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

Most of it was missing this in
in classes with a template parameter as base and similarly missing Base:: in
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
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.

Posted By: a.schoenle
Date 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:
http://" rel="nofollow -

Posted By: a.schoenle
Date Posted: 18 November 2018 at 5:16am
Try again." rel="nofollow -

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.

Print Page | Close Window