I am using CMake gui to compile krita source code under windows10

Series Article Directory

foreword

I am under windows10, using CMake gui to compile the krita source code
where is the source code: E:/krita-dev/krita
where to build the binaries: E:/krita-dev/krita_camke
current generator:MinGW Makefiles
click Configure, Generate, output:

1. Krita Compilation Instructions

krita official document

Other Compilers
In the past we used mingw-w64 gcc 7.3.0 (mingw-builds). This version is no longer supported because our dependencies started requiring a more updated compiler to work.

It is possible to build Krita with a newer mingw-w64 gcc toolchain, for example gcc 11.2.0 by niXman on GitHub (mingw-builds), or the one from MSYS2.

MSYS2 can build Krita with the MINGW64, UCRT64 or CLANG64 environments.

Krita can also be built with MSVC (check the batch file in build-tools\windows). Krita built with MSVC has suboptimal performance due to codegen issues so we can’t use it.

The translation is as follows:
MSYS2 can use MINGW64, UCRT64 or CLANG64 environment to build Krita.

Krita can also be built using MSVC (see the batch file in build-tools\windows). Krita built with MSVC performed poorly due to code generation issues, so we couldn't use it.
But I always get an error when compiling with MSYS2 minGW64. It should be that there is a conflict between the version of the zug library and the libpaintop plug-in, and an error is always reported, so I have to use CMake gui to compile

2. Use steps

Use CMake gui to compile, be careful not to choose the visual studio 2019 compiler, because the libraries in krita are basically compiled using MinGW, and vc++ compilation conflicts with the MinGW compiler, even if the krita.sln project is barely generated, it will be compatible Sexual questions generate tens of thousands of errors.
insert image description here
. Next, you need to compile the source code using the MinGW Makefiles generator. Here are the steps:

Open Windows PowerShell or a command prompt.

Change to the directory you used to build the binaries earlier. According to your description, the directory is E:/krita-dev/krita_cmake. Enter the following command at the command line:

bash
Copy code
cd E:/krita-dev/krita_cmake
Make sure you have added MinGW to your system's PATH variable. You can verify this by executing the command:
css
Copy code
g++ --version
If you see output similar to g++ (MinGW.org GCC-8.2.0-5) 8.2.0, your MinGW environment is configured correctly. If you get an error, check your MinGW installation and add it to your system's PATH variable.

You can now compile the Krita source code with MinGW. Enter the following command at the command line:
go
Copy code
mingw32-make
This will start the compilation process. Compilation may take some time, depending on your computer performance.

After compiling, you can find the generated executable and other related files in the E:/krita-dev/krita_cmake directory. You can run these files to test your compiled Krita application.

First ensure that powerShell is installed on the machine
insert image description here

Guess you like

Origin blog.csdn.net/aoxuestudy/article/details/130133657
Recommended