Windows, MSVC 2019 build

To whom it may concerns,

I have managed to adapt and build the tag v4.4.2 using MSVC 2019, both 3rdparties and the application have been adapted. The compilation speed has been improved a lot and MSVC is much more stable for developing and debugging.

I the way through, I stumbled into some minor issues that some of them must be corrected for any compiler I believe.

I wonder if the development team is interested in maintaining MSVC building since I believe it is worth it for sure, if so, I would like to contribute regarding this.

Look forward to hearing from you,

Best Regards,
Ramin Raeisi

Hi Ramin!

Sure we are interested! Very much so! Coincidentally today we had a developer meeting where one of the points raised was that PyQt and PySide really only can be built using msvc in their new versions, and one of us @amyspark was going to dig in deeper, so if you can share your patches, that would be awesome.

There were two areas of concern: one is whether Vc was built correctly, and the other whether the benchmarks shows a performace regressions. Have you checked that?

Great, good to know, I can confirm that Vc (and all other dependencies, I invested working on them) is building ok, but I did not perform the benchmark testing, but I am definitely interested if this is going to be part of Krita’s main repo.

There are patches for the 3rdparties and the main application, nevertheless there are only two issues that I think we should talk about in detail as I believe the other patches are technically correct and needed,

  1. Pimpl, for some classes I stumbled into pimpl compilation errors and I had to move the Private classes to the header, but I think it should be resolved as I did not have enough time to dig in.

  2. I built the app using Desktop OpenGL but the egl has been included somewhere anyhow in the code so I wonder if Angel is needed anyhow? I was not expecting that

All other patches were logical and technically right, but for sure should be assessed by you.



Ideally, you’d open a merge request on Merge Requests · Graphics / Krita · GitLab, then we can discuss individual issues. It’s probably not correct to move the pimpl classes in to the header files, but msvc is picky when it comes to visibility so we need to look into that.

Angle is still needed because on Windows, opengl drivers are pretty bad, and without angle which translates opengl to direct3d, there will be a huge amount of bugs.


You may want to split the MR into two, one for the 3rdparty deps and another for the changes on Krita itself.

That way we can check it builds across all supported OSes before moving on to MSVC.


Yes that makes sense. How is your branching modeled? Shall I create the MR for the master or you have another intermediate approach?

I have done this whole process for v4.4.2 and now I can see some updates here and there in cmakes, 3rdparty and app, so I have to go through it again, I will start with 3rdparty and then app

Or can I stick to the latest v4.4.3 for now? and create the MR based on that, as I assume that the master might change in the meantime, right?

For master, please.

Ok, will do

I am done with the 3rdparty, just need to upload the compiled zip file of needed openssl library for msvc, and also I wonder if I have to have an user account in order to create the MR? Please advise

All the third party libraries have been compiled successfully but the drmingw which of-course does not make sense!

Ah, yes, of course – I’m wonderning whether msvc has something else to help giving crash logs, other than pdb’s, which were a disaster for us when we built Krita with msvc years ago.

Yes, you need to make an account to create the merge request: you can make the account at

We must investigate that

I did create the account as snookerplayer id, so is it all it takes or I should be added to the repo?

How can I upload the prebuilt openssl library for msvc2019 here KDE - Experience Freedom! ?

I created the MR, 3rdparty: Add msvc2019 compilation support (!776) · Merge Requests · Graphics / Krita · GitLab

I created the MR for 3rdparty, 3rdparty: Add msvc2019 compilation support (!776) · Merge Requests · Graphics / Krita · GitLab)

1 Like